Largest rectangular sub matrix with the number difference k
问题 Input: A 2-dimensional array NxN - Matrix - with numbers from 0 to 9. Output: Largest rectangular area where absolute value of number's difference in area is k . Possible input: int k=3; const int N=5; int matrix[N][N] = {{9, 3, 8, 2, 0}, {2, 7, 6, 8, 5}, {8, 5, 7, 7, 6}, {3, 0, 4, 0, 9}, {7, 2, 0, 4, 0}}; Is it related to find largest area in histogram problem? If it does how I can transform this matrix two binary matrix? And how to approach this kind of problems? Answer: largest area is 8