Run error in histogram

I am getting the correct answer for the given test case but while submitting I am getting run error in all the test cases.
so please tell me what I am doing wrong.

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

This worked thanks :+1: