Practice Find Kth Largest XOR Coordinate Value
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Find Kth Largest XOR Coordinate Value
Problem Statement
You are given a 2D matrix of size m x n, consisting of non-negative integers. You are also given an integer k. The value of coordinate (a, b) of the matrix is the XOR of all matrix[i][j] where 0 <= i <= a < m and 0 <= j <= b < n (0-indexed). Find the kth largest value (1-indexed) of all the coordinates of matrix.
Source: Find Kth Largest XOR Coordinate Value on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
matrix = [[5,2],[1,6]], k = 1
7
# Example 2
matrix = [[5,2],[1,6]], k = 2
5
# Example 3
matrix = [[5,2],[1,6]], k = 3
4
Constraints
Related LeetCode Problems
Practice more problems similar to Find Kth Largest XOR Coordinate Value.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.