MY CODE IS NOT WORKING, ALTHOUGH IT IS GIVING CORRECT OUTPUT ON EVERY SAMPLE TEST CASE THAT I ENTER MANUALLY, HERE IS THE LINK FOR CODE https://ide.codingblocks.com/s/89060
Histrogram problem
I am not able to understand why have you taken two separate functions for area ?
Just tried 2 different approaches,None working!!!
pls respond!!!
I have made some changes in your code, try to submit it now,
Can you atleast explain what changes you did?
I have made changes in few lines of code, your code was working fine for sample case, but it failed at some corner cases, Plz refer to this video,
For better understanding of the problem
pls respond? help me understand my mistake!!!
One mistake you were doing in your function was that you were taking
int element=arr[s.top()];
rather, you are just required to check only for s.top();
Rest other implementation is almost similar as per the video which I have send.