Leetcode 2736. Maximum Sum Queries
Given pairs (nums1[j], nums2[j]) with weight nums1[j]+nums2[j], answer each query by finding the maximum weight among points whose both coordinates are >= given thresholds โ a 2D dominance max query problem. With n, q up to 1e5, itโs typically solved offline by sorting by one coordinate and using a segment tree / Fenwick or ordered map over the other coordinate to maintain range maximums.
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.