Buy and Sell Series Probelm

25 May 2021 LeetCode and Python

309. Best Time to Buy and Sell Stock with Cooldown

Find the maximum profit you can achieve. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times) with the following restrictions:

After you sell your stock, you cannot buy stock on the next day (i.e., cooldown one day).

Comments