solulubeta
Sign in
NeetCode 150 / 2-D Dynamic Programming
14.03 · Problem

Best Time to Buy and Sell Stock with Cooldown

Medium State machine DP 1 video LC 309 Pro

This problem is part of solulu Pro

prices[i] is a stock's price on day i. You may complete as many buy-sell transactions as you like, holding at most one share at a time, but after you sell you must wait one day (cooldown) before buying again. Return the…

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 113 of 150 · updated 2026-10-12