Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 122. Best Time to Buy and Sell Stock II
Given daily stock prices, compute the maximum profit you can achieve with unlimited buy/sell operations while holding at most one share at a time (you may buy and sell on the same day). The optimal strategy is to capture every upward price movement, i.e., sum all positive consecutive day-to-day gains.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.