MaxProfit
CodeChefOpen on judge ↗
Van der Marwee is a money minded guy. He always run after the money. Now he has got interest in stock market investment. Van der Marwee has got a friend in corporation X, but the stock price of the corporation X is rather volatile. Now Van der Marwee could buy unit stock one time only and then sell it later. Since he has got a friend in the corporation who can precisely tell Van der Marwee about t
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start