会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
noaman_wgs
博客园
::
首页
::
博问
::
闪存
::
新随笔
::
联系
::
订阅
::
管理
::
公告
2021年2月21日
字节-LeetCode【42. 接雨水】
摘要: 一、题目 二、解题思路 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)
编辑