Any hints for the histogram area problem?

https://online.codingblocks.com/player/20973/content/5646/4880

Hi Aman,
In this question you have to traverse all bars from left to right, and maintain a stack of bars. Every bar is pushed to stack once. You have to pop a bar from stack when a bar of smaller height is seen. When a bar is popped, you have to calculate the area with the popped bar as smallest bar.

Hi Aman
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.