IDNLearn.com is designed to help you find reliable answers to any question you have. Our platform provides trustworthy answers to help you make informed decisions quickly and easily.
You are given a 2D binary array grid. You need to find 3 non-overlapping rectangles having non-zero areas with horizontal and vertical sides such that all the 1's in grid lie inside these rectangles.
Return the minimum possible sum of the area of these rectangles.
Note that the rectangles are allowed to touch.
Example 1:
Input: grid = [[1,0,1],[1,1,1]]
Output: 5
Solve this question in java.
Sagot :
Your presence in our community is highly appreciated. Keep sharing your insights and solutions. Together, we can build a rich and valuable knowledge resource for everyone. Thank you for choosing IDNLearn.com for your queries. We’re here to provide accurate answers, so visit us again soon.