solulubeta
Sign in
Story Problems / Dynamic programming
07.20 · Problem

Stock Trader With Cooldown

Hard 2-D DP · state machine (holding / not holding) Pro

This problem is part of solulu Pro

A trader knows tomorrow's share prices for n days. He may buy and sell any number of times but can hold at most one share at a time, and after selling he must wait one full day (cooldown) before buying again. What is the…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 94 of 94 · updated 2026-10-12