Histogram Area Doubt

How to handle the case if the input array is in ascending order or input is like 2 , 1 , 2 ?

Hi @ksalokya… go through my code https://ide.codingblocks.com/s/598064
if u still have any doubts watch the video on the same again… prateek bhaiya has explained it very well…

I checked your code. Thank you.
can you please debug this - https://ide.codingblocks.com/s/598071

Hi @ksalokya… ur code is perfectly fine and passing all test cases…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.