跳至主要內容

热门企业题库


谷歌

题号标题题解标签难度力扣频次
1048最长字符串链数组 哈希表 双指针 3+🟠🀄️open in new window 🔗open in new window29
105从前序与中序遍历序列构造二叉树[✓] 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window21
398随机数索引水塘抽样 哈希表 数学 1+🟠🀄️open in new window 🔗open in new window16
317离建筑物最近的距离 🔒广度优先搜索 数组 矩阵🔴🀄️open in new window 🔗open in new window16
394字符串解码[✓] 递归 字符串🟠🀄️open in new window 🔗open in new window16
840矩阵中的幻方数组 哈希表 数学 1+🟠🀄️open in new window 🔗open in new window16
150逆波兰表达式求值[✓] 数组 数学🟠🀄️open in new window 🔗open in new window15
1272删除区间 🔒数组🟠🀄️open in new window 🔗open in new window15
391完美矩形数组 扫描线🔴🀄️open in new window 🔗open in new window14
621任务调度器贪心 数组 哈希表 3+🟠🀄️open in new window 🔗open in new window14
375猜数字大小 II[✓]数学 动态规划 博弈🟠🀄️open in new window 🔗open in new window14
1056易混淆数 🔒数学🟢🀄️open in new window 🔗open in new window14
1146快照数组设计 数组 哈希表 1+🟠🀄️open in new window 🔗open in new window14
269火星词典 🔒深度优先搜索 广度优先搜索 3+🔴🀄️open in new window 🔗open in new window14
695岛屿的最大面积[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window13
57插入区间[✓]数组🟠🀄️open in new window 🔗open in new window13
157用 Read4 读取 N 个字符 🔒数组 交互 模拟🟢🀄️open in new window 🔗open in new window12
297二叉树的序列化与反序列化[✓] 深度优先搜索 广度优先搜索 3+🔴🀄️open in new window 🔗open in new window12
56合并区间[✓]数组 排序🟠🀄️open in new window 🔗open in new window12
1631最小体力消耗路径深度优先搜索 广度优先搜索 并查集 4+🟠🀄️open in new window 🔗open in new window12
1377T 秒后青蛙的位置 深度优先搜索 广度优先搜索 1+🔴🀄️open in new window 🔗open in new window12
632最小区间[✓]贪心 数组 哈希表 3+🔴🀄️open in new window 🔗open in new window12
127单词接龙[✓]广度优先搜索 哈希表 字符串🔴🀄️open in new window 🔗open in new window12
528按权重随机选择数组 数学 二分查找 2+🟠🀄️open in new window 🔗open in new window12
1825求出 MK 平均值设计 队列 数据流 2+🔴🀄️open in new window 🔗open in new window12
99恢复二叉搜索树[✓] 深度优先搜索 二叉搜索树 1+🟠🀄️open in new window 🔗open in new window11
302包含全部黑色像素的最小矩形 🔒深度优先搜索 广度优先搜索 数组 2+🔴🀄️open in new window 🔗open in new window11
284窥视迭代器设计 数组 迭代器🟠🀄️open in new window 🔗open in new window11
1353最多可以参加的会议数目贪心 数组 排序 1+🟠🀄️open in new window 🔗open in new window11
1406石子游戏 III数组 数学 动态规划 1+🔴🀄️open in new window 🔗open in new window10
1197进击的骑士 🔒广度优先搜索🟠🀄️open in new window 🔗open in new window10
736Lisp 语法解析 递归 哈希表 1+🔴🀄️open in new window 🔗open in new window10
1777每家商店的产品价格 🔒数据库🟢🀄️open in new window 🔗open in new window10
359日志速率限制器 🔒设计 哈希表 数据流🟢🀄️open in new window 🔗open in new window10
741摘樱桃数组 动态规划 矩阵🔴🀄️open in new window 🔗open in new window10
538把二叉搜索树转换为累加树 深度优先搜索 二叉搜索树 1+🟠🀄️open in new window 🔗open in new window8
2184建造坚实的砖墙的方法数 🔒位运算 数组 动态规划 1+🟠🀄️open in new window 🔗open in new window8
841钥匙和房间深度优先搜索 广度优先搜索 🟠🀄️open in new window 🔗open in new window5
463岛屿的周长深度优先搜索 广度优先搜索 数组 1+🟢🀄️open in new window 🔗open in new window4
1568使陆地分离的最少天数深度优先搜索 广度优先搜索 数组 2+🔴🀄️open in new window 🔗open in new window2

脸书

题号标题题解标签难度力扣频次
359日志速率限制器 🔒设计 哈希表 数据流🟢🀄️open in new window 🔗open in new window20
133克隆图[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window20
138随机链表的复制[✓]哈希表 链表🟠🀄️open in new window 🔗open in new window19
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window19
1268搜索推荐系统字典树 数组 字符串 3+🟠🀄️open in new window 🔗open in new window18
953验证外星语词典数组 哈希表 字符串🟢🀄️open in new window 🔗open in new window18
973最接近原点的 K 个点[✓]几何 数组 数学 4+🟠🀄️open in new window 🔗open in new window18
29两数相除[✓]位运算 数学🟠🀄️open in new window 🔗open in new window18
636函数的独占时间 数组🟠🀄️open in new window 🔗open in new window18
210课程表 II[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window17
329矩阵中的最长递增路径深度优先搜索 广度优先搜索 5+🔴🀄️open in new window 🔗open in new window16
157用 Read4 读取 N 个字符 🔒数组 交互 模拟🟢🀄️open in new window 🔗open in new window16
523连续的子数组和数组 哈希表 数学 1+🟠🀄️open in new window 🔗open in new window16
65有效数字字符串🔴🀄️open in new window 🔗open in new window15
1249移除无效的括号 字符串🟠🀄️open in new window 🔗open in new window15
1382将二叉搜索树变平衡贪心 深度优先搜索 3+🟠🀄️open in new window 🔗open in new window15
203移除链表元素[✓]递归 链表🟢🀄️open in new window 🔗open in new window14
139单词拆分[✓]字典树 记忆化搜索 数组 3+🟠🀄️open in new window 🔗open in new window14
543二叉树的直径[✓] 深度优先搜索 二叉树🟢🀄️open in new window 🔗open in new window14
211添加与搜索单词 - 数据结构设计[✓]深度优先搜索 设计 字典树 1+🟠🀄️open in new window 🔗open in new window14
279完全平方数[✓]广度优先搜索 数学 动态规划🟠🀄️open in new window 🔗open in new window14
348设计井字棋 🔒设计 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window14
347前 K 个高频元素[✓]数组 哈希表 分治 5+🟠🀄️open in new window 🔗open in new window14
380O(1) 时间插入、删除和获取随机元素[✓]设计 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window14
1428至少有一个 1 的最左端列 🔒数组 二分查找 交互 1+🟠🀄️open in new window 🔗open in new window14
227基本计算器 II[✓] 数学 字符串🟠🀄️open in new window 🔗open in new window13
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window13
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window13
266回文排列 🔒位运算 哈希表 字符串🟢🀄️open in new window 🔗open in new window13
88合并两个有序数组[✓]数组 双指针 排序🟢🀄️open in new window 🔗open in new window13
560和为 K 的子数组[✓]数组 哈希表 前缀和🟠🀄️open in new window 🔗open in new window13
71简化路径[✓] 字符串🟠🀄️open in new window 🔗open in new window13
238除自身以外数组的乘积[✓]数组 前缀和🟠🀄️open in new window 🔗open in new window12
1539第 k 个缺失的正整数数组 二分查找🟢🀄️open in new window 🔗open in new window12
125验证回文串[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window12
827最大人工岛深度优先搜索 广度优先搜索 并查集 2+🔴🀄️open in new window 🔗open in new window12
199二叉树的右视图[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window12
746使用最小花费爬楼梯[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window12
158用 Read4 读取 N 个字符 II - 多次调用 🔒数组 交互 模拟🔴🀄️open in new window 🔗open in new window12
415字符串相加[✓]数学 字符串 模拟🟢🀄️open in new window 🔗open in new window12
42接雨水[✓] 数组 双指针 2+🔴🀄️open in new window 🔗open in new window11
1762能看到海景的建筑物 🔒 数组 单调栈🟠🀄️open in new window 🔗open in new window10
1429第一个唯一数字 🔒设计 队列 数组 2+🟠🀄️open in new window 🔗open in new window10
721账户合并深度优先搜索 广度优先搜索 并查集 4+🟠🀄️open in new window 🔗open in new window10
234回文链表[✓] 递归 链表 1+🟢🀄️open in new window 🔗open in new window10
510二叉搜索树中的中序后继 II 🔒 二叉搜索树 二叉树🟠🀄️open in new window 🔗open in new window10
424替换后的最长重复字符哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window10
958二叉树的完全性检验[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window10
301删除无效的括号广度优先搜索 字符串 回溯🔴🀄️open in new window 🔗open in new window10
863二叉树中所有距离为 K 的结点 深度优先搜索 广度优先搜索 2+🟠🀄️open in new window 🔗open in new window10

苹果

题号标题题解标签难度力扣频次
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window24
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window19
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window18
1095山脉数组中查找目标值数组 二分查找 交互🔴🀄️open in new window 🔗open in new window18
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window17
121买卖股票的最佳时机[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window16
273整数转换英文表示递归 数学 字符串🔴🀄️open in new window 🔗open in new window16
767重构字符串贪心 哈希表 字符串 3+🟠🀄️open in new window 🔗open in new window16
692前K个高频单词字典树 哈希表 字符串 4+🟠🀄️open in new window 🔗open in new window16
642设计搜索自动补全系统 🔒深度优先搜索 设计 字典树 4+🔴🀄️open in new window 🔗open in new window16
1547切棍子的最小成本数组 动态规划 排序🔴🀄️open in new window 🔗open in new window15
743网络延迟时间深度优先搜索 广度优先搜索 2+🟠🀄️open in new window 🔗open in new window14
722删除注释数组 字符串🟠🀄️open in new window 🔗open in new window14
398随机数索引水塘抽样 哈希表 数学 1+🟠🀄️open in new window 🔗open in new window14
54螺旋矩阵[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window14
725分隔链表链表🟠🀄️open in new window 🔗open in new window14
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window14
308二维区域和检索 - 矩阵可修改 🔒设计 树状数组 线段树 2+🔴🀄️open in new window 🔗open in new window13
309买卖股票的最佳时机含冷冻期[✓]数组 动态规划🟠🀄️open in new window 🔗open in new window12
867转置矩阵数组 矩阵 模拟🟢🀄️open in new window 🔗open in new window12
295数据流的中位数[✓]设计 双指针 数据流 2+🔴🀄️open in new window 🔗open in new window12
135分发糖果[✓]贪心 数组🔴🀄️open in new window 🔗open in new window11
560和为 K 的子数组[✓]数组 哈希表 前缀和🟠🀄️open in new window 🔗open in new window11
186反转字符串中的单词 II 🔒双指针 字符串🟠🀄️open in new window 🔗open in new window7

亚马逊

题号标题题解标签难度力扣频次
106从中序与后序遍历序列构造二叉树[✓] 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window23
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window21
49字母异位词分组[✓]数组 哈希表 字符串 1+🟠🀄️open in new window 🔗open in new window19
116填充每个节点的下一个右侧节点指针[✓] 深度优先搜索 广度优先搜索 2+🟠🀄️open in new window 🔗open in new window19
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window18
210课程表 II[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window16
48旋转图像[✓]数组 数学 矩阵🟠🀄️open in new window 🔗open in new window16
151反转字符串中的单词[✓]双指针 字符串🟠🀄️open in new window 🔗open in new window15
126单词接龙 II广度优先搜索 哈希表 字符串 1+🔴🀄️open in new window 🔗open in new window15
56合并区间[✓]数组 排序🟠🀄️open in new window 🔗open in new window14
322零钱兑换[✓]广度优先搜索 数组 动态规划🟠🀄️open in new window 🔗open in new window14
253会议室 II 🔒贪心 数组 双指针 3+🟠🀄️open in new window 🔗open in new window14
445两数相加 II[✓] 链表 数学🟠🀄️open in new window 🔗open in new window14
472连接词深度优先搜索 字典树 数组 2+🔴🀄️open in new window 🔗open in new window14
381O(1) 时间插入、删除和获取随机元素 - 允许重复设计 数组 哈希表 2+🔴🀄️open in new window 🔗open in new window14
238除自身以外数组的乘积[✓]数组 前缀和🟠🀄️open in new window 🔗open in new window14
99恢复二叉搜索树[✓] 深度优先搜索 二叉搜索树 1+🟠🀄️open in new window 🔗open in new window12
121买卖股票的最佳时机[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window12
240搜索二维矩阵 II[✓]数组 二分查找 分治 1+🟠🀄️open in new window 🔗open in new window12
47全排列 II[✓]数组 回溯🟠🀄️open in new window 🔗open in new window12
63不同路径 II[✓]数组 动态规划 矩阵🟠🀄️open in new window 🔗open in new window11
279完全平方数[✓]广度优先搜索 数学 动态规划🟠🀄️open in new window 🔗open in new window11
212单词搜索 II[✓]字典树 数组 字符串 2+🔴🀄️open in new window 🔗open in new window10
937重新排列日志文件数组 字符串 排序🟠🀄️open in new window 🔗open in new window7
224基本计算器[✓] 递归 数学 1+🔴🀄️open in new window 🔗open in new window6
17电话号码的字母组合[✓]哈希表 字符串 回溯🟠🀄️open in new window 🔗open in new window6
692前K个高频单词字典树 哈希表 字符串 4+🟠🀄️open in new window 🔗open in new window6
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window6
295数据流的中位数[✓]设计 双指针 数据流 2+🔴🀄️open in new window 🔗open in new window4
348设计井字棋 🔒设计 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window4
799香槟塔动态规划🟠🀄️open in new window 🔗open in new window3
387字符串中的第一个唯一字符队列 哈希表 字符串 1+🟢🀄️open in new window 🔗open in new window3
155最小栈[✓] 设计🟠🀄️open in new window 🔗open in new window3
140单词拆分 II字典树 记忆化搜索 数组 4+🔴🀄️open in new window 🔗open in new window2
828统计子串中的唯一字符哈希表 字符串 动态规划🔴🀄️open in new window 🔗open in new window2

微软

题号标题题解标签难度力扣频次
103二叉树的锯齿形层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window22
1448统计二叉树中好节点的数目[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window18
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window16
297二叉树的序列化与反序列化[✓] 深度优先搜索 广度优先搜索 3+🔴🀄️open in new window 🔗open in new window14
4寻找两个正序数组的中位数[✓]数组 二分查找 分治🔴🀄️open in new window 🔗open in new window14
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window14
340至多包含 K 个不同字符的最长子串 🔒哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window14
210课程表 II[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window12
117填充每个节点的下一个右侧节点指针 II[✓] 深度优先搜索 广度优先搜索 2+🟠🀄️open in new window 🔗open in new window12
45跳跃游戏 II[✓]贪心 数组 动态规划🟠🀄️open in new window 🔗open in new window11
1258近义词句子 🔒并查集 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window11
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window10
1254统计封闭岛屿的数目深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window10
116填充每个节点的下一个右侧节点指针[✓] 深度优先搜索 广度优先搜索 2+🟠🀄️open in new window 🔗open in new window10
987二叉树的垂序遍历 深度优先搜索 广度优先搜索 3+🔴🀄️open in new window 🔗open in new window9
105从前序与中序遍历序列构造二叉树[✓] 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window9
442数组中重复的数据[✓]数组 哈希表🟠🀄️open in new window 🔗open in new window9
341扁平化嵌套列表迭代器 深度优先搜索 3+🟠🀄️open in new window 🔗open in new window8
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window7
487最大连续1的个数 II 🔒数组 动态规划 滑动窗口🟠🀄️open in new window 🔗open in new window1

腾讯

题号标题题解标签难度力扣频次
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window85
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window82
21合并两个有序链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window45
83删除排序链表中的重复元素[✓]链表🟢🀄️open in new window 🔗open in new window38
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window35
415字符串相加[✓]数学 字符串 模拟🟢🀄️open in new window 🔗open in new window31
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window30
704二分查找[✓]数组 二分查找🟢🀄️open in new window 🔗open in new window30
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window29
8字符串转换整数 (atoi)[✓]字符串🟠🀄️open in new window 🔗open in new window28
232用栈实现队列[✓] 设计 队列🟢🀄️open in new window 🔗open in new window26
189轮转数组[✓]数组 数学 双指针🟠🀄️open in new window 🔗open in new window25
234回文链表[✓] 递归 链表 1+🟢🀄️open in new window 🔗open in new window23
470用 Rand7() 实现 Rand10()数学 拒绝采样 概率与统计 1+🟠🀄️open in new window 🔗open in new window23
300最长递增子序列[✓]数组 二分查找 动态规划🟠🀄️open in new window 🔗open in new window22
70爬楼梯[✓]记忆化搜索 数学 动态规划🟢🀄️open in new window 🔗open in new window22
1两数之和[✓]数组 哈希表🟢🀄️open in new window 🔗open in new window22
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window21
1143最长公共子序列[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window20
153寻找旋转排序数组中的最小值[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window20
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window19
25K 个一组翻转链表[✓]递归 链表🔴🀄️open in new window 🔗open in new window19
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window19
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window18
125验证回文串[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window18
100相同的树[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window18
19删除链表的倒数第 N 个结点[✓]链表 双指针🟠🀄️open in new window 🔗open in new window18
460LFU 缓存设计 哈希表 链表 1+🔴🀄️open in new window 🔗open in new window17
4寻找两个正序数组的中位数[✓]数组 二分查找 分治🔴🀄️open in new window 🔗open in new window17
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window16
42接雨水[✓] 数组 双指针 2+🔴🀄️open in new window 🔗open in new window16
136只出现一次的数字[✓]位运算 数组🟢🀄️open in new window 🔗open in new window16
14最长公共前缀[✓]字典树 字符串🟢🀄️open in new window 🔗open in new window16
160相交链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window16
121买卖股票的最佳时机[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window15
剑指 Offer 54二叉搜索树的第k大节点[✓] 深度优先搜索 二叉搜索树 1+🟢🀄️open in new window15
112路径总和[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window14
442数组中重复的数据[✓]数组 哈希表🟠🀄️open in new window 🔗open in new window14
2两数相加[✓]递归 链表 数学🟠🀄️open in new window 🔗open in new window14
227基本计算器 II[✓] 数学 字符串🟠🀄️open in new window 🔗open in new window14
153寻找旋转排序数组中的最小值[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window14
165比较版本号双指针 字符串🟠🀄️open in new window 🔗open in new window13
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window13
54螺旋矩阵[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window13
322零钱兑换[✓]广度优先搜索 数组 动态规划🟠🀄️open in new window 🔗open in new window13
剑指 Offer 22链表中倒数第k个节点[✓]链表 双指针🟢🀄️open in new window13
43字符串相乘[✓]数学 字符串 模拟🟠🀄️open in new window 🔗open in new window13
155最小栈[✓] 设计🟠🀄️open in new window 🔗open in new window12

百度

题号标题题解标签难度力扣频次
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window61
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window34
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window32
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window24
300最长递增子序列[✓]数组 二分查找 动态规划🟠🀄️open in new window 🔗open in new window23
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window21
179最大数贪心 数组 字符串 1+🟠🀄️open in new window 🔗open in new window21
232用栈实现队列[✓] 设计 队列🟢🀄️open in new window 🔗open in new window20
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window18
112路径总和[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window17
104二叉树的最大深度[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window17
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window16
19删除链表的倒数第 N 个结点[✓]链表 双指针🟠🀄️open in new window 🔗open in new window16
1两数之和[✓]数组 哈希表🟢🀄️open in new window 🔗open in new window16
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window15
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window15
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window14
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window14
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window14
4寻找两个正序数组的中位数[✓]数组 二分查找 分治🔴🀄️open in new window 🔗open in new window13
21合并两个有序链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window13
70爬楼梯[✓]记忆化搜索 数学 动态规划🟢🀄️open in new window 🔗open in new window12
56合并区间[✓]数组 排序🟠🀄️open in new window 🔗open in new window12
72编辑距离[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window12
94二叉树的中序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window12
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window12
25K 个一组翻转链表[✓]递归 链表🔴🀄️open in new window 🔗open in new window11

阿里

题号标题题解标签难度力扣频次
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window59
912排序数组数组 分治 桶排序 5+🟠🀄️open in new window 🔗open in new window40
470用 Rand7() 实现 Rand10()数学 拒绝采样 概率与统计 1+🟠🀄️open in new window 🔗open in new window32
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window31
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window26
105从前序与中序遍历序列构造二叉树[✓] 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window26
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window22
1两数之和[✓]数组 哈希表🟢🀄️open in new window 🔗open in new window21
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window20
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window19
125验证回文串[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window19
19删除链表的倒数第 N 个结点[✓]链表 双指针🟠🀄️open in new window 🔗open in new window18
1114按序打印多线程🟢🀄️open in new window 🔗open in new window18
92反转链表 II[✓]链表🟠🀄️open in new window 🔗open in new window18
56合并区间[✓]数组 排序🟠🀄️open in new window 🔗open in new window18
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window16
1143最长公共子序列[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window16
19删除链表的倒数第 N 个结点[✓]链表 双指针🟠🀄️open in new window 🔗open in new window15
232用栈实现队列[✓] 设计 队列🟢🀄️open in new window 🔗open in new window14
165比较版本号双指针 字符串🟠🀄️open in new window 🔗open in new window14
25K 个一组翻转链表[✓]递归 链表🔴🀄️open in new window 🔗open in new window13
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window13
165比较版本号双指针 字符串🟠🀄️open in new window 🔗open in new window12
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window11
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window10
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window9
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window9
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window9
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window9
103二叉树的锯齿形层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window9
94二叉树的中序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window9

字节

题号标题题解标签难度力扣频次
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window410
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window223
25K 个一组翻转链表[✓]递归 链表🔴🀄️open in new window 🔗open in new window220
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window186
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window170
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window148
103二叉树的锯齿形层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window140
121买卖股票的最佳时机[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window128
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window126
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window121
1两数之和[✓]数组 哈希表🟢🀄️open in new window 🔗open in new window101
160相交链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window100
54螺旋矩阵[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window99
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window98
42接雨水[✓] 数组 双指针 2+🔴🀄️open in new window 🔗open in new window98
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window97
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window94
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window86
31下一个排列[✓]数组 双指针🟠🀄️open in new window 🔗open in new window86
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window84
300最长递增子序列[✓]数组 二分查找 动态规划🟠🀄️open in new window 🔗open in new window82
199二叉树的右视图[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window75
143重排链表[✓] 递归 链表 1+🟠🀄️open in new window 🔗open in new window72
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window72
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window72
88合并两个有序数组[✓]数组 双指针 排序🟢🀄️open in new window 🔗open in new window68
21合并两个有序链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window67
41缺失的第一个正数[✓]数组 哈希表🔴🀄️open in new window 🔗open in new window65
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window64
415字符串相加[✓]数学 字符串 模拟🟢🀄️open in new window 🔗open in new window63
92反转链表 II[✓]链表🟠🀄️open in new window 🔗open in new window62
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window62
221最大正方形[✓]数组 动态规划 矩阵🟠🀄️open in new window 🔗open in new window56
56合并区间[✓]数组 排序🟠🀄️open in new window 🔗open in new window55
72编辑距离[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window53
69x 的平方根[✓]数学 二分查找🟢🀄️open in new window 🔗open in new window53
148排序链表[✓]链表 双指针 分治 2+🟠🀄️open in new window 🔗open in new window53
129求根节点到叶节点数字之和[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window53
165比较版本号双指针 字符串🟠🀄️open in new window 🔗open in new window52
101对称二叉树[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window51
112路径总和[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window40
912排序数组数组 分治 桶排序 5+🟠🀄️open in new window 🔗open in new window37
445两数相加 II[✓] 链表 数学🟠🀄️open in new window 🔗open in new window36
142环形链表 II[✓]哈希表 链表 双指针🟠🀄️open in new window 🔗open in new window34
153寻找旋转排序数组中的最小值[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window32
81搜索旋转排序数组 II[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window32
128最长连续序列[✓]并查集 数组 哈希表🟠🀄️open in new window 🔗open in new window30
34在排序数组中查找元素的第一个和最后一个位置[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window26
155最小栈[✓] 设计🟠🀄️open in new window 🔗open in new window25
264丑数 II[✓]哈希表 数学 动态规划 1+🟠🀄️open in new window 🔗open in new window24
394字符串解码[✓] 递归 字符串🟠🀄️open in new window 🔗open in new window24
189轮转数组[✓]数组 数学 双指针🟠🀄️open in new window 🔗open in new window22
125验证回文串[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window22

美团

题号标题题解标签难度力扣频次
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window76
88合并两个有序数组[✓]数组 双指针 排序🟢🀄️open in new window 🔗open in new window61
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window56
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window50
92反转链表 II[✓]链表🟠🀄️open in new window 🔗open in new window47
21合并两个有序链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window46
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window44
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window41
143重排链表[✓] 递归 链表 1+🟠🀄️open in new window 🔗open in new window40
82删除排序链表中的重复元素 II[✓]链表 双指针🟠🀄️open in new window 🔗open in new window38
1114按序打印多线程🟢🀄️open in new window 🔗open in new window37
142环形链表 II[✓]哈希表 链表 双指针🟠🀄️open in new window 🔗open in new window33
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window33
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window28
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window28
704二分查找[✓]数组 二分查找🟢🀄️open in new window 🔗open in new window27
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window27
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window27
93复原 IP 地址[✓]字符串 回溯🟠🀄️open in new window 🔗open in new window26
1两数之和[✓]数组 哈希表🟢🀄️open in new window 🔗open in new window26
232用栈实现队列[✓] 设计 队列🟢🀄️open in new window 🔗open in new window23
54螺旋矩阵[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window22
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window21
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window21
8字符串转换整数 (atoi)[✓]字符串🟠🀄️open in new window 🔗open in new window20
718最长重复子数组数组 二分查找 动态规划 3+🟠🀄️open in new window 🔗open in new window20
19删除链表的倒数第 N 个结点[✓]链表 双指针🟠🀄️open in new window 🔗open in new window19
25K 个一组翻转链表[✓]递归 链表🔴🀄️open in new window 🔗open in new window18
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window18
剑指 Offer 22链表中倒数第k个节点[✓]链表 双指针🟢🀄️open in new window18
121买卖股票的最佳时机[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window17
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window17
144二叉树的前序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window17
415字符串相加[✓]数学 字符串 模拟🟢🀄️open in new window 🔗open in new window16
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window16
69x 的平方根[✓]数学 二分查找🟢🀄️open in new window 🔗open in new window15
94二叉树的中序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window14
1143最长公共子序列[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window14
239滑动窗口最大值[✓]队列 数组 滑动窗口 2+🔴🀄️open in new window 🔗open in new window14
剑指 Offer 40最小的k个数[✓]数组 分治 快速选择 2+🟢🀄️open in new window13

快手

题号标题题解标签难度力扣频次
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window40
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window29
92反转链表 II[✓]链表🟠🀄️open in new window 🔗open in new window25
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window24
21合并两个有序链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window23
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window23
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window22
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window19
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window19
88合并两个有序数组[✓]数组 双指针 排序🟢🀄️open in new window 🔗open in new window19
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window19
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window16
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window16
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window15
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window14
415字符串相加[✓]数学 字符串 模拟🟢🀄️open in new window 🔗open in new window14
1143最长公共子序列[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window14
142环形链表 II[✓]哈希表 链表 双指针🟠🀄️open in new window 🔗open in new window14
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window13
144二叉树的前序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window13
54螺旋矩阵[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window12
160相交链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window12
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window12
103二叉树的锯齿形层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window11
300最长递增子序列[✓]数组 二分查找 动态规划🟠🀄️open in new window 🔗open in new window11