会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lzyerste
博客园
首页
新随笔
联系
管理
订阅
[置顶]
LeetCode索引
摘要: "LeetCode题解汇总"
阅读全文
posted @ 2018-12-23 00:02 lzyerste
阅读(114)
评论(0)
推荐(0)
2018年12月23日
959. Regions Cut By Slashes
摘要: https://leetcode.com/problems/regions cut by slashes/ 题解1,搜索 BFS搜索能连成一片的区域。 Runtime: 236 ms, faster than 76.69% of Python3 online submissions for Regi
阅读全文
posted @ 2018-12-23 12:39 lzyerste
阅读(89)
评论(0)
推荐(0)
2018年12月22日
1. Two Sum
摘要: 链接:https://leetcode.com/problems/two sum/ 题解1 O(N) 遍历整个数组。将之前遍历过的元素,使用字典维护对应的下标。 遍历到下标i的时候,它之前的所有元素 都已维护好,那么只要看差值 是不是在字典中即可。 题解2 O(NlgN) 先排序,再双指针。
阅读全文
posted @ 2018-12-22 23:50 lzyerste
阅读(80)
评论(0)
推荐(0)
公告