>_
trap.js
JavaScript 26.10
Not run yet

+ 7 hidden

Input
height = [3, 0, 2, 0, 4]
Expected
7

The walls 3 and 4 set the level at 3, so the three middle bars hold 3 + 1 + 3 = 7.