noaman_wgs

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2021年2月21日

摘要: 一、题目 二、解题思路 class Solution { /** * 优化:提前先把每个格子对应的左边、右边最大值算出来,这样就可以将时间复杂度降到O(n) * */ public int trap(int[] height) { if (height == null || height.lengt 阅读全文
posted @ 2021-02-21 17:28 noaman_wgs 阅读(105) 评论(0) 推荐(0) 编辑