You are viewing a single comment's thread. Return to all comments →
I used stack to keep track of heights. You can have look on my github https://github.com/ubbn/HackerRank/blob/master/datastructure/stacks/largestrectangle/Solution.java
Edit: Yes, not cumulative. Wording is corrected
Seems like cookies are disabled on this browser, please enable them to open this website
Largest Rectangle
You are viewing a single comment's thread. Return to all comments →
I used stack to keep track of heights. You can have look on my github https://github.com/ubbn/HackerRank/blob/master/datastructure/stacks/largestrectangle/Solution.java
Edit: Yes, not cumulative. Wording is corrected