摘要: 动态规化 使用两个数组保存左边数字的最大值与右边数字的最大值遍历数组中每个元素,该元素所在位置能接的雨水量为该元素左边界和右边界的最小值减去该位置柱子的高度 class Solution { public int trap(int[] height) { if (height == null || 阅读全文
posted @ 2020-10-01 11:27 消灭猕猴桃 阅读(77) 评论(0) 推荐(0) 编辑