首页
沸点
课程
数据标注
HOT
AI Coding
更多
直播
活动
APP
插件
直播
活动
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
登录
注册
哈哈哈个
掘友等级
获得徽章 0
动态
文章
专栏
沸点
收藏集
关注
作品
赞
3
文章 3
沸点 0
赞
3
返回
|
搜索文章
最新
热门
438. Find All Anagrams in a String
solution: Sliding window + counter, O(N), O(K) simplest approach: sliding window + two counter hashm
3176. Find the Maximum Length of a Good Subsequence I
solution: dp O(N^2 * k),O(NK) dp[i][j] represents the maximum length of subsequence ending at index
3155. Maximum Number of Upgradable Servers
Intuitive: For each data center, can upgrade 1, 2, 3,... up to K servers, using O(N) loop over all t
2467. Most Profitable Path in a Tree
Solution Build the Tree: Use an graph to represent the undirected tree. DFS: Bob going up, Alice goi
1600. Throne Inheritance
Solution: N-tree pre order traversal 「else return x's oldest child who's not in curOrder」-> pick a c
849. Maximize Distance to Closest Person
1.Keep record of previos of 1 2. Group by 0 s // 0000000001111 if (seats[prev] != 1)
872. Leaf-Similar Trees
solutiuon List<Integer> list1 = new ArrayList<>(); List<Integer> list2 = new ArrayList<>();
1639. Number of Ways to Form a Target String Given a Dictionary
SOLUTION: DP dp[i][j] = number of ways to build the first i characters of target using the first j c
2265. Count Nodes Equal to Average of Subtree
solution DFS int leftSum = resLeft[0], leftCount = resLeft[1]; int rightSum = resRight[0], r
291. Word Pattern II
Solution Use a map to track pattern character -> substring. the mapping is bi-direction, so we need
下一页
个人成就
文章被点赞
30
文章被阅读
56,652
掘力值
1,725
关注了
0
关注者
9
收藏集
2
关注标签
3
加入于
2020-12-27