Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2874. Maximum Value of an Ordered Triplet II
Given an array, find the maximum value of (nums[i] - nums[j]) * nums[k] over all ordered triplets i < j < k (return 0 if all such values are negative); this reduces to evaluating each middle index j while choosing the best preceding nums[i] and succeeding nums[k] to maximize the product under n up to 1e5 and nums up to 1e6.
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.