Maximal Square - C++ Solution @ LeetCode
Maximal Square, is a LeetCode problem. In this post we will see how we can solve this challenge in C++
Problem Description
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
For example, given the following matrix:
1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0
Return 4.
Credits:Special thanks to @Freezen for adding this problem and creating all test cases. ....
You can find the full details of the problem Maximal Square at LeetCode
Solution: Please check the main.cpp snippet for the solution.
This solution originally posted at: Github by @kamyu104
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.