I am confused about the requirement. If it is maximal rectangle that contains all the 1s, I could just return the size of the input if any 1 is detected anywhere...
Yeah, this could be better. I thought to find the rec to contain all the 1s of the matrix at first and that was not hard lol.
@yanggao Thanks, just corrected this in the description.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.