Need clarity with examples

  • 0

    A test run shows the answer for the following is 7: [7, 1, 5, 3, 6, 4]. Can someone explain how is that achieved? As I understand, you could grab the min share at 1 and keep on selling every next day and that will come as 4+2+5+3=14. Doesn't look like I understood this question clearly.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.