首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
哈哈哈个
掘友等级
获得徽章 0
动态
文章
专栏
沸点
收藏集
关注
作品
赞
3
文章 3
沸点 0
赞
3
返回
|
搜索文章
最新
热门
981. Time Based Key-Value Store
Solutionap { Map<String, ArrayList<Pair<Integer, String>>> map; public TimeMap() { /
540. Single Element in a Sorted Array
Solution: Binary search We remove nums[mid], resulting in left half arr and right half arr, the suba
76. Minimum Window Substring
Solution: sliding window O(∣S∣+∣T∣) t may include duplicates, so we need to count frequency of t Exp
261. Graph Valid Tree
Solution 1: check if loop exist Solution 2: Using graph property Check whether or not there are n -
787. Cheapest Flights Within K Stops
Solution BFS we will perform a level-wise BFS iteration over the nodes level limited by k cost[] sto
528. Random Pick with Weight
SolutionidWlkIjoiMjMwNDIyNjM5OTg5MzA3MCJ9&rk3s=e9ecf3d6&x-orig-authkey=f32326d3454f2ac7e96d3d06cdbb0
399. Evaluate Division
Solution Build graph and BFS The direction of edge indicates the order of division, and the weight o
117. Populating Next Right Pointers in Each Node II
Solution1 level order traversal O(N)O(N) Solution2: using established linkedlist O(N)O(1) since we d
116. Populating Next Right Pointers in Each Node
Solution1: O(N) O(N) Level order traversal Solution2 : O(N) O(1) when we go over the nodes of a part
545. Boundary of Binary Tree
Solution: average time O(h) worst case is O(n) Find seperately.
下一页
个人成就
文章被点赞
29
文章被阅读
42,763
掘力值
1,696
关注了
0
关注者
8
收藏集
2
关注标签
3
加入于
2020-12-27