Available question text
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.
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 2874. Maximum Value of an Ordered Triplet II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source