Count Square Submatrices
Given a matrix containing only ones and zeros, return the count of square submatrices with all ones.
We'll cover the following...
Statement
Given an N ∗ M
matrix containing only ones and zeros, count the total number of square submatrices that contain only 1’s
.
Example
Consider the input matrix given below. We have a total of square submatrices with all ones, including square matrices of order 1 x 1 and square matrix of order 2 x 2.
Sample input
[
[1,0,1],
[1,1,0],
...