Preparing this workspace.
Problem editorial
We're currently writing the detailed solution for this problem. Check back soon.
Solve ProblemBest Time to Buy and Sell Stock II is a Greedy Patterns problem, in the Buy/Sell Stock subpattern. Once the approach above makes sense, write it yourself and then work through the neighbouring problems that reuse it.