Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2873. Maximum Value of an Ordered Triplet I
Given an array, find the maximum (nums[i] - nums[j]) * nums[k] over all i < j < k (return 0 if all results are negative). Key insight: for each middle index j, maximize the difference using the largest previous nums[i] and the product using the largest subsequent nums[k], so evaluate using prefix/suffix maxima.
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.