Available question text
Given daily prices and an integer k, pick at most k non-overlapping transactions (each is a pair of days i<j where you either buy-then-sell or short-sell-then-buy) to maximize total profit. Equivalently, choose up to k disjoint index pairs to maximize the sum of the absolute price differences |prices[j] - prices[i]|.
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 IV
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
No company association
Leetcode 3573. Best Time to Buy and Sell Stock V
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source