We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The DP approach smiplifies the code to a large extent, if you get the approach.
For eg. here the approach is:
1. Get the rectangle for a building (sub-problem)
2. Do it for all the the buildings (recursion or looping)
3. Return the maximum of the lot.
Largest Rectangle
You are viewing a single comment's thread. Return to all comments →
The DP approach smiplifies the code to a large extent, if you get the approach. For eg. here the approach is: 1. Get the rectangle for a building (sub-problem) 2. Do it for all the the buildings (recursion or looping) 3. Return the maximum of the lot.