Wrong answers in test cases in histogram problem

i am getting wrong answer in all test case but getting right answer when i run the code myself.

link-https://ide.codingblocks.com/s/135473

I have edited your code. Try to submit it now…