Search
⌘K
Get Premium
Leetcode 2291. Maximum Profit From Trading Stocks
Given an array of daily stock prices and trading constraints (e.g., limits on number of transactions, transaction fees, or cooldowns), compute the maximum profit achievable by choosing buy/sell days. This typically requires modeling holding vs. not-holding states and using dynamic programming or a state-machine/greedy approach to track optimal decisions over time.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early November, 2025
Meta
Manager
Given an array of stock prices find the best time to buy and sell stock to maximize profit.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.