Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.