JavaScript:实现Trapping Rain Water捕获雨水问题算法 export const trap = (heights) => { const maxes = new Array(heights.length)