All test cases failing in Histogram Max Area

https://ide.codingblocks.com/s/191465 The sample test case is giving correct output. I have chosen long long int as the data type according to the constraints. What is the problem in the code?

Hello @shruthi019,

There is a small logical mistake in your code that i have corrected:


Please, refer to the comments for better understanding.

Hope, this would help.
Give a like if you are satisfied.

1 Like