[Python] Simple Solution | DP & Quick Select | Time O(mn)
python\nclass Solution(object):\n    def kthLargestValue(self, matrix, k):\n        def quickSelect(a, k):\n            if not a: return\n\t\t\tpivot = random.c
```python\nclass Solution(object):\n    def kthLargestValue(self, matrix, k):\n        def quickSelect(a, k):\n            if not a: return\n\t\t\tpivot = random.choice(a)\n            l = [num for num in a if num > pivot]\n            m = [num for num in a if num == pivot]\n            r = [num for num in a if num < pivot]\n            L, M = len(l), len(m)\n            if k <= L: return quickSelect(l, k)\n            elif k > L+M: return quickSelect(r, k-L-M)\n            else: return m[0]\n        \n        m, n = len(matrix), len(matrix[0])\n        arr = []\n        for i in xrange(m):\n            for j in xrange(n):\n                if i: matrix[i][j] ^= matrix[i-1][j]\n                if j: matrix[i][j] ^= matrix[i][j-1]\n                if i and j: matrix[i][j] ^= matrix[i-1][j-1]\n                arr.append(matrix[i][j])\n        return quickSelect(arr, k)\n```
[]