Available question text
Given an array of prices, choose indices i < j < k with strictly increasing prices[i] < prices[j] < prices[k] to maximize the total profit from two sequential transactions (buy at i, sell at j, then buy at j, sell at k). This is essentially finding an increasing triplet that maximizes combined gain and is typically solved with a small fixed-k DP or linear scans using best-left/best-right values.
Related questions
Continue with questions that share topics or the same question type.
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 2907. Maximum Profitable Triplets With Increasing Prices I
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source