Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2907. Maximum Profitable Triplets With Increasing Prices I
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.