Stock Maximize Discussions | | HackerRank

Stock Maximize

  • + 0 comments

    Here is a hint on how to make this much easier and optimize the runtime: Go through the prices array backwards.

    Second hint: track the maximum price and the current price. Use that to find your profits.