Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1738. Find Kth Largest XOR Coordinate Value
Given an m×n matrix, compute for each coordinate (a,b) the XOR of all elements in the submatrix from (0,0) to (a,b) (2D prefix XORs) and return the k-th largest value among these m·n results. The challenge is to efficiently compute all prefix XORs (O(mn)) and select the k-th largest from up to 10^6 values (e.g., via a size-k min-heap or selection algorithm).
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.