[Java] Prefix XOR | Min PriorityQueue
\t\tint r = matrix.length;\n        int c = matrix[0].length;\n        \n        int[][] xor = new int[r][c];\n        xor[0][0] = matrix[0][0];\n        \n    
\t\tint r = matrix.length;\n        int c = matrix[0].length;\n        \n        int[][] xor = new int[r][c];\n        xor[0][0] = matrix[0][0];\n        \n        for(int i=0;i<r;i++){\n                for(int j=0;j<c;j++){\n                    if(j==0) {\n                        xor[i][0] = matrix[i][0];\n                    }else{\n                        xor[i][j]= xor[i][j-1]^matrix[i][j];         \n                    }                       \n            }\n        }  \n              \n        for(int j=0;j<c;j++){\n            for(int i=1;i<r;i++){\n                xor[i][j]= xor[i-1][j]^xor[i][j];\n        }\n        }       \n        \n        int m=0;\n        int nums[] = new int[r*c];     \n        \n        for(int i=0;i<r;i++){\n            for(int j=0;j<c;j++){\n            \tnums[m] = xor[i][j];\n            \tm++;\n            }\n        }  \n        \n        PriorityQueue<Integer> pQueue = new PriorityQueue<Integer>();\n        for(int i=0;i<k;i++){\n            pQueue.add(nums[i]);\n        }\n        for(int i=k;i<nums.length;i++){\n            int top = pQueue.peek();\n            if(nums[i]>top){\n                pQueue.poll();\n                pQueue.add(nums[i]);\n            }\n        }\n        return pQueue.peek();
[]