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 ...

Markdown supported · ⌘↵ to post
No responses yet.