Given a 2d matrix, filled with 1 and 0. Find the maximum sub-matrix that has only 1’s and return the area.
Given matrix: Maximum sub-matrix: To solve this problem, we shall use Dynamic Programming. For the given M * N matrix, we shall take another M…