Java || Dynamic Programming || Max Heap
\nclass Solution {\n    public int kthLargestValue(int[][] matrix, int k) {\n        PriorityQueue<Integer> maxHeap = new PriorityQueue<>(Collections.reverseOrd
```\nclass Solution {\n    public int kthLargestValue(int[][] matrix, int k) {\n        PriorityQueue<Integer> maxHeap = new PriorityQueue<>(Collections.reverseOrder());\n        maxHeap.offer(matrix[0][0]);\n        for(int i=0;i<matrix.length;i++) {\n            for(int j=0;j<matrix[0].length;j++) {\n                if(i == 0 && j == 0) {\n                    continue;\n                }\n                if(i == 0) {\n                    matrix[i][j] ^= matrix[i][j-1]; \n                } else if(j == 0) {\n                    matrix[i][j] ^= matrix[i-1][j];\n                } else {\n                    matrix[i][j] ^= matrix[i][j-1] ^ matrix[i-1][j] ^ matrix[i-1][j-1];\n                }\n                maxHeap.offer(matrix[i][j]);\n            }\n        }\n        int answer = maxHeap.poll();\n        for(int i=1;i<k;i++) {\n            answer = maxHeap.poll();\n        }\n        return answer;\n    }\n}\n```
['Dynamic Programming', 'Heap (Priority Queue)', 'Java']