Best Time to Buy and Sell Stock #121
Check the problem statement on leetcode
Intuition
You can not sell first and buy later. So it will remove all the cases where you need to check the difference from previous values
You only have to make 1 trade
You only need to find the difference ...
rajanlagah.hashnode.dev2 min read