Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 457 Bytes

File metadata and controls

5 lines (3 loc) · 457 Bytes

It's like Best Time to Buy and Sell Stock II. Go to solve that problem and see the explanation here firstly.

In this problem, we can define three array named sell, buy, and rest, everyday we can sell, buy, or rest, it's the DP problem as well.

Think it over.