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.
- Largest Rectangle
- Discussions
Largest Rectangle
Largest Rectangle
Sort by
recency
|
25 Discussions
|
Please Login in order to post a comment
Python, recursive, not O(N) but short.
def largestRectangle(h): # Write your code here stack = [0] area = 0 top = 0 h.append(0) for i in range(1, len(h)):
Java O(n)
Java 8 Solution:
C#