This commit is contained in:
huangge1199 2021-04-06 12:57:36 +08:00
parent 7c88ef05d1
commit d85429aad4

View File

@ -1,31 +0,0 @@
//给定一个直方图(也称柱状图)假设有人从上面源源不断地倒水最后直方图能存多少水量?直方图的宽度为 1
//
//
//
// 上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的直方图在这种情况下可以接 6 个单位的水蓝色部分表示水 感谢 Marco
//s 贡献此图
//
// 示例:
//
// 输入: [0,1,0,2,1,0,1,3,2,1,2,1]
//输出: 6
// Related Topics 数组 双指针
// 👍 168 👎 0
package leetcode.editor.cn;
//面试题 17.21:直方图的水量
public class VolumeOfHistogramLcci{
public static void main(String[] args) {
//测试代码
Solution solution = new VolumeOfHistogramLcci().new Solution();
}
//力扣代码
//leetcode submit region begin(Prohibit modification and deletion)
class Solution {
public int trap(int[] height) {
}
}
//leetcode submit region end(Prohibit modification and deletion)
}