Available question text
Given a price array and integer k, maximize total profit using at most k non-overlapping buy-sell transactions (cannot hold multiple stocks simultaneously). This is a DP problem over days and transaction counts, with the key optimization that when k >= n/2 it reduces to the unlimited-transactions case solvable greedily.
Related questions
Continue with questions that share topics or the same question type.
- Best Time to Buy and Sell Stock
Coding · Array · Dynamic Programming
- Best Time to Buy and Sell Stock II
Coding · Array · Dynamic Programming · Greedy
- Best Time to Buy and Sell Stock III
Coding
- Best Time to Buy and Sell Stock using Strategy
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Oracle
Leetcode 188. Best Time to Buy and Sell Stock IV
Reported Feb 6, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source