Maximum histogram area

https://ide.codingblocks.com/s/65208
the output is not correct where is the problem

Hi Kiran, I’ve modified your code a bit, go through the changes and reply to this thread if you have any doubt. Also, take the data type according to the given constraints.
You can refer to the code here https://ide.codingblocks.com/s/65482