NeetCode #720LC-309Medium2-D Dynamic ProgrammingNC 150NC 250
← Back to All Problems

#720 · #309 · Best Time to Buy and Sell Stock with Cooldown(最佳买卖股票时机含冷冻期)

📌 Problem Statement & Constraints

Given prices, find the maximum profit from any number of buy/sell transactions, with the restriction that after selling you must wait one day before buying again. You may hold at most one share at a time. Constraints: 1 <= prices.length <= 5000, 0 <= prices[i] <= 1000.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!