I imagined this to output 2 for [2,1,2] but it returns 4. So it means that it is not like https://github.com/adnanaziz/epicode/blob/master/java/src/main/java/com/epi/TrappingRainWater.java. Could someone please explain why it won't be 2? I could imagine 11 + 11 = 2.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.