Test case failed

test case failed wrong answer

hi @akshitabansal321 u need to check this

int water = min(left[i],right[i]) - arr[i];
if(water > 0)ans+=water;

else it will add negative value eg
left is 2 right is 3 min of them is 2 and arr[i] is 5 then u will add -3