Maximize profit on a stock where you must rest one day after selling.
Constraints
Example
>>> max_profit([1,2,3,0,2]) 3 >>> max_profit([1]) 0 >>> max_profit([2,1]) 0 >>> max_profit([3,3,5,0,0,3,1,4]) 6
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints