Please explain the issue in the code
Histogram Wrong Answer
There was a small error in your code, that was in line no 13 and 14th u need to directly push i++ instead of i, and also the constraint in input is for large value of N, so plz use long long int N, and long long int array, instead of just int, as some test cases might be failing because of this.
I have made slight changes, try to submit it now
Thank you , the issue was regarding the input size changing to long long int worked
Plz mark your doubt resolved, if you were able to submit the code