LeetCode 309: Best Time to Buy and Sell Stock with Cooldown
Problem Restatement We are given an integer array prices . prices[i] is the price of a stock on day i . We may complete as many transactions as we want, but with two restrictions: We cannot hold more than one stock at the same time. After selling a stock, we cannot buy on the next day. That next day is a cooldown day. Return the maximum profit we can make....