309. Best Time to Buy and Sell Stock with Cooldown
Problem Statement
Input: prices = [1,2,3,0,2]
Output: 3
Explanation: transactions = [buy, sell, cooldown, buy, sell]Input: prices = [1]
Output: 0Intuition
Links
Video Links
Approach 1:
Approach 2:
Approach 3:
Approach 4:
Similar Problems
Previous188. Best Time to Buy and Sell Stock IVNext714. Best Time to Buy and Sell Stock with Transaction Fee
Last updated