only this much was the algorithm…
something missed out orrr ???
help
Histogram area ...why not working
you also have to do some work outside the loop if stack is not empty
inside loop instead of if you have to use while loop
see the modified Code
Modified Code