Find largest sub-matrix with all 1s (not necessarily square)
In last post, we saw a dynamic programming approach to for finding maximum size square sub-matrix with all 1s. In this post, we will discuss how to find largest all 1s sub-matrix in a binary matrix. The resultant sub-matrix is not necessarily a square sub-matrix.
Example:
> > > > 1 1 0 0 1 0 > > > > > 0 1 1 1 1 1 > > > > > 1 1 1 1 1 0 > > > > > 0 0 1 1 0 0 > > ```Largest all 1s sub-matrix is from (1,1) to (2,4).
[Read More]