Histogram challenge


whats wrong in this code

this should be
while(!s.empty() && a[s.top()]>=a[bar]){

it still not working

main mistake is you have not process elements after for loop
which is also required

Modified Code
i have done required changes you can see and ask if any problem

i hope this clear now
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:
if you have more doubts regarding this feel free to ask