Leetcode 3572. Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values
Given paired arrays x and y, pick three indices with pairwise distinct x-values to maximize the sum of their y-values. This reduces to grouping y-values by x, taking the maximum y for each distinct x, and summing the top three such maxima (or returning -1 if fewer than three distinct x-values exist).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.