Solution: Smallest Rectangle Enclosing Black Pixels
Explore a binary matrix problem where you find the smallest axis-aligned rectangle enclosing all black pixels. Learn to apply binary search on rows and columns combined with matrix properties to achieve a runtime better than O(m × n), optimizing for time and space.
We'll cover the following...
We'll cover the following...
Statement
You are given an image, where