##
Finding the maximum square sub-matrix with all equal elements
March 2, 2017

Given a N x N matrix, determine the maximum K such that K x K is a submatrix with all equal elements i.e., all the elements in this submatrix must be same. Constraints: 1 <= N <= 1000 0 <= Ai , j <= 109 Examples: Input : a[][] = {{2, 3, 3}, {2, 3,… Read More »