Histogram Problem

Only the sample is running Please help me out

Nikhil your implementation is pretty wrong!, I’ll suggest you go through video again rewrite the code. Your this code is valid only when given array is sorted.