Python, DP solution
class Solution:\n    def kthLargestValue(self, matrix: List[List[int]], k: int) -> int:\n        \n        q = [matrix[0][0]]\n        \n        for i in range(
class Solution:\n    def kthLargestValue(self, matrix: List[List[int]], k: int) -> int:\n        \n        q = [matrix[0][0]]\n        \n        for i in range(len(matrix)):\n            for j in range(len(matrix[0])):\n                if i == j == 0:\n                    continue\n                elif i == 0:\n                    matrix[i][j] ^= matrix[i][j-1]\n                elif j == 0:\n                    matrix[i][j] ^= matrix[i-1][j]\n                else:\n                    matrix[i][j] ^= matrix[i-1][j] ^ matrix[i][j-1] ^ matrix[i-1][j-1]\n\t\t\t\tif len(q) < k:\n\t\t\t\t\theapq.heappush(q, matrix[i][j])\n\t\t\t\telse:\n\t\t\t\t\theapq.heappushpop(q, matrix[i][j])\n        \n        return q[0]
['Dynamic Programming', 'Python']