30:00
Find the maximum profit with a cooldown period of 1 day after selling (cannot buy the next day after selling).
1≤prices.length≤50001 \leq \text{prices.length} \leq 50001≤prices.length≤5000
0≤prices[i]≤10000 \leq \text{prices}[i] \leq 10000≤prices[i]≤1000
(holding stock)
(just sold)
(can buy)
Initialize state machine