some test cases failed , tell what to do .reason for failed cases
Rain water trapping
@souravraj024 calculating right and left maximum for every bar will give you TLE. you should precompute the left max upto i and right max upto i in two arrays. in this way you don’t need to run 2 for loops for every bars.