跳至主要內容

CodeTop 热题排行榜


题号标题题解标签难度力扣频次
3无重复字符的最长子串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window 🔗open in new window642
206反转链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window575
146LRU 缓存[✓]设计 哈希表 链表 1+🟠🀄️open in new window 🔗open in new window525
215数组中的第K个最大元素[✓]数组 分治 快速选择 2+🟠🀄️open in new window 🔗open in new window420
25K 个一组翻转链表[✓]递归 链表🔴🀄️open in new window 🔗open in new window332
15三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window310
53最大子数组和[✓]数组 分治 动态规划🟠🀄️open in new window 🔗open in new window261
21合并两个有序链表[✓]递归 链表🟢🀄️open in new window 🔗open in new window242
1两数之和[✓]数组 哈希表🟢🀄️open in new window 🔗open in new window232
5最长回文子串[✓]双指针 字符串 动态规划🟠🀄️open in new window 🔗open in new window222
33搜索旋转排序数组[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window220
102二叉树的层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window220
121买卖股票的最佳时机[✓]数组 动态规划🟢🀄️open in new window 🔗open in new window211
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window211
141环形链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window210
20有效的括号[✓] 字符串🟢🀄️open in new window 🔗open in new window207
88合并两个有序数组[✓]数组 双指针 排序🟢🀄️open in new window 🔗open in new window204
46全排列[✓]数组 回溯🟠🀄️open in new window 🔗open in new window202
103二叉树的锯齿形层序遍历[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window200
236二叉树的最近公共祖先[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window199
54螺旋矩阵[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window186
92反转链表 II[✓]链表🟠🀄️open in new window 🔗open in new window184
160相交链表[✓]哈希表 链表 双指针🟢🀄️open in new window 🔗open in new window176
23合并 K 个升序链表[✓]链表 分治 堆(优先队列) 1+🔴🀄️open in new window 🔗open in new window173
415字符串相加[✓]数学 字符串 模拟🟢🀄️open in new window 🔗open in new window166
300最长递增子序列[✓]数组 二分查找 动态规划🟠🀄️open in new window 🔗open in new window163
142环形链表 II[✓]哈希表 链表 双指针🟠🀄️open in new window 🔗open in new window148
143重排链表[✓] 递归 链表 1+🟠🀄️open in new window 🔗open in new window148
42接雨水[✓] 数组 双指针 2+🔴🀄️open in new window 🔗open in new window147
19删除链表的倒数第 N 个结点[✓]链表 双指针🟠🀄️open in new window 🔗open in new window129
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window129
72编辑距离[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window127
56合并区间[✓]数组 排序🟠🀄️open in new window 🔗open in new window125
94二叉树的中序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window124
232用栈实现队列[✓] 设计 队列🟢🀄️open in new window 🔗open in new window120
704二分查找[✓]数组 二分查找🟢🀄️open in new window 🔗open in new window120
1143最长公共子序列[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window120
199二叉树的右视图[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window118
82删除排序链表中的重复元素 II[✓]链表 双指针🟠🀄️open in new window 🔗open in new window117
4寻找两个正序数组的中位数[✓]数组 二分查找 分治🔴🀄️open in new window 🔗open in new window117
93复原 IP 地址[✓]字符串 回溯🟠🀄️open in new window 🔗open in new window114
148排序链表[✓]链表 双指针 分治 2+🟠🀄️open in new window 🔗open in new window111
31下一个排列[✓]数组 双指针🟠🀄️open in new window 🔗open in new window111
69x 的平方根[✓]数学 二分查找🟢🀄️open in new window 🔗open in new window109
70爬楼梯[✓]记忆化搜索 数学 动态规划🟢🀄️open in new window 🔗open in new window109
8字符串转换整数 (atoi)[✓]字符串🟠🀄️open in new window 🔗open in new window106
2两数相加[✓]递归 链表 数学🟠🀄️open in new window 🔗open in new window106
22括号生成[✓]字符串 动态规划 回溯🟠🀄️open in new window 🔗open in new window105
239滑动窗口最大值[✓]队列 数组 滑动窗口 2+🔴🀄️open in new window 🔗open in new window98
41缺失的第一个正数[✓]数组 哈希表🔴🀄️open in new window 🔗open in new window97
165比较版本号双指针 字符串🟠🀄️open in new window 🔗open in new window96
剑指 Offer 22链表中倒数第k个节点[✓]链表 双指针🟢🀄️open in new window95
76最小覆盖子串[✓]哈希表 字符串 滑动窗口🔴🀄️open in new window 🔗open in new window87
78子集[✓]位运算 数组 回溯🟠🀄️open in new window 🔗open in new window85
322零钱兑换[✓]广度优先搜索 数组 动态规划🟠🀄️open in new window 🔗open in new window84
155最小栈[✓] 设计🟠🀄️open in new window 🔗open in new window84
105从前序与中序遍历序列构造二叉树[✓] 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window84
43字符串相乘[✓]数学 字符串 模拟🟠🀄️open in new window 🔗open in new window82
151反转字符串中的单词[✓]双指针 字符串🟠🀄️open in new window 🔗open in new window81
32最长有效括号[✓] 字符串 动态规划🔴🀄️open in new window 🔗open in new window81
144二叉树的前序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window78
104二叉树的最大深度[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window77
110平衡二叉树[✓] 深度优先搜索 二叉树🟢🀄️open in new window 🔗open in new window77
129求根节点到叶节点数字之和[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window76
101对称二叉树[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window76
543二叉树的直径[✓] 深度优先搜索 二叉树🟢🀄️open in new window 🔗open in new window74
98验证二叉搜索树[✓] 深度优先搜索 二叉搜索树 1+🟠🀄️open in new window 🔗open in new window71
48旋转图像[✓]数组 数学 矩阵🟠🀄️open in new window 🔗open in new window70
113路径总和 II[✓] 深度优先搜索 回溯 1+🟠🀄️open in new window 🔗open in new window69
221最大正方形[✓]数组 动态规划 矩阵🟠🀄️open in new window 🔗open in new window68
39组合总和[✓]数组 回溯🟠🀄️open in new window 🔗open in new window68
470用 Rand7() 实现 Rand10()数学 拒绝采样 概率与统计 1+🟠🀄️open in new window 🔗open in new window68
64最小路径和[✓]数组 动态规划 矩阵🟠🀄️open in new window 🔗open in new window68
34在排序数组中查找元素的第一个和最后一个位置[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window67
394字符串解码[✓] 递归 字符串🟠🀄️open in new window 🔗open in new window66
234回文链表[✓] 递归 链表 1+🟢🀄️open in new window 🔗open in new window65
112路径总和[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window65
240搜索二维矩阵 II[✓]数组 二分查找 分治 1+🟠🀄️open in new window 🔗open in new window61
169多数元素[✓]数组 哈希表 分治 2+🟢🀄️open in new window 🔗open in new window61
718最长重复子数组数组 二分查找 动态规划 3+🟠🀄️open in new window 🔗open in new window60
162寻找峰值[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window60
226翻转二叉树[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window59
14最长公共前缀[✓]字典树 字符串🟢🀄️open in new window 🔗open in new window58
662二叉树最大宽度[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window57
122买卖股票的最佳时机 II[✓]贪心 数组 动态规划🟠🀄️open in new window 🔗open in new window56
695岛屿的最大面积[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window56
128最长连续序列[✓]并查集 数组 哈希表🟠🀄️open in new window 🔗open in new window56
152乘积最大子数组[✓]数组 动态规划🟠🀄️open in new window 🔗open in new window55
62不同路径[✓]数学 动态规划 组合数学🟠🀄️open in new window 🔗open in new window55
83删除排序链表中的重复元素[✓]链表🟢🀄️open in new window 🔗open in new window54
227基本计算器 II[✓] 数学 字符串🟠🀄️open in new window 🔗open in new window54
139单词拆分[✓]字典树 记忆化搜索 数组 3+🟠🀄️open in new window 🔗open in new window52
179最大数贪心 数组 字符串 1+🟠🀄️open in new window 🔗open in new window51
198打家劫舍[✓]数组 动态规划🟠🀄️open in new window 🔗open in new window51
24两两交换链表中的节点[✓]递归 链表🟠🀄️open in new window 🔗open in new window50
283移动零[✓]数组 双指针🟢🀄️open in new window 🔗open in new window49
560和为 K 的子数组[✓]数组 哈希表 前缀和🟠🀄️open in new window 🔗open in new window49
209长度最小的子数组[✓]数组 二分查找 前缀和 1+🟠🀄️open in new window 🔗open in new window49
297二叉树的序列化与反序列化[✓] 深度优先搜索 广度优先搜索 3+🔴🀄️open in new window 🔗open in new window49
153寻找旋转排序数组中的最小值[✓]数组 二分查找🟠🀄️open in new window 🔗open in new window49
468验证IP地址字符串🟠🀄️open in new window 🔗open in new window48
138随机链表的复制[✓]哈希表 链表🟠🀄️open in new window 🔗open in new window47
739每日温度[✓] 数组 单调栈🟠🀄️open in new window 🔗open in new window46
136只出现一次的数字[✓]位运算 数组🟢🀄️open in new window 🔗open in new window45
460LFU 缓存设计 哈希表 链表 1+🔴🀄️open in new window 🔗open in new window45
剑指 Offer 9用两个栈实现队列[✓] 设计 队列🟢🀄️open in new window44
402移掉 K 位数字 贪心 字符串 1+🟠🀄️open in new window 🔗open in new window44
11盛最多水的容器[✓]贪心 数组 双指针🟠🀄️open in new window 🔗open in new window43
剑指 Offer 36二叉搜索树与双向链表[✓] 深度优先搜索 4+🟠🀄️open in new window43
224基本计算器[✓] 递归 数学 1+🔴🀄️open in new window 🔗open in new window43
207课程表[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window43
498对角线遍历[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window43
958二叉树的完全性检验[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window42
47全排列 II[✓]数组 回溯🟠🀄️open in new window 🔗open in new window40
79单词搜索[✓]数组 字符串 回溯 1+🟠🀄️open in new window 🔗open in new window38
55跳跃游戏[✓]贪心 数组 动态规划🟠🀄️open in new window 🔗open in new window38
123买卖股票的最佳时机 III[✓]数组 动态规划🔴🀄️open in new window 🔗open in new window38
61旋转链表[✓]链表 双指针🟠🀄️open in new window 🔗open in new window38
50Pow(x, n)[✓]递归 数学🟠🀄️open in new window 🔗open in new window37
剑指 Offer 51数组中的逆序对[✓]树状数组 线段树 数组 4+🔴🀄️open in new window37
7整数反转[✓]数学🟠🀄️open in new window 🔗open in new window37
剑指 Offer 54二叉搜索树的第k大节点[✓] 深度优先搜索 二叉搜索树 1+🟢🀄️open in new window37
59螺旋矩阵 II[✓]数组 矩阵 模拟🟠🀄️open in new window 🔗open in new window36
剑指 Offer 40最小的k个数[✓]数组 分治 快速选择 2+🟢🀄️open in new window36
145二叉树的后序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window36
剑指 Offer 10-II青蛙跳台阶问题[✓]记忆化搜索 数学 动态规划🟢🀄️open in new window36
74搜索二维矩阵[✓]数组 二分查找 矩阵🟠🀄️open in new window 🔗open in new window35
26删除有序数组中的重复项[✓]数组 双指针🟢🀄️open in new window 🔗open in new window35
518零钱兑换 II[✓]数组 动态规划🟠🀄️open in new window 🔗open in new window35
剑指 Offer 42连续子数组的最大和[✓]数组 分治 动态规划🟢🀄️open in new window35
40组合总和 II[✓]数组 回溯🟠🀄️open in new window 🔗open in new window35
剑指 Offer 4二维数组中的查找[✓]数组 二分查找 分治 1+🟠🀄️open in new window34
440字典序的第K小数字[✓]字典树🔴🀄️open in new window 🔗open in new window33
450删除二叉搜索树中的节点[✓] 二叉搜索树 二叉树🟠🀄️open in new window 🔗open in new window33
75颜色分类[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window33
剑指 Offer 10斐波那契数列[✓]记忆化搜索 数学 动态规划🟢🀄️open in new window33
剑指 Offer 26树的子结构[✓] 深度优先搜索 二叉树🟠🀄️open in new window32
45跳跃游戏 II[✓]贪心 数组 动态规划🟠🀄️open in new window 🔗open in new window31
230二叉搜索树中第 K 小的元素[✓] 深度优先搜索 二叉搜索树 1+🟠🀄️open in new window 🔗open in new window31
剑指 Offer 62圆圈中最后剩下的数字[✓]递归 数学🟢🀄️open in new window30
剑指 Offer 21调整数组顺序使奇数位于偶数前面[✓]数组 双指针 排序🟢🀄️open in new window30
16最接近的三数之和[✓]数组 双指针 排序🟠🀄️open in new window 🔗open in new window29
125验证回文串[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window29
225用队列实现栈[✓] 设计 队列🟢🀄️open in new window 🔗open in new window29
135分发糖果[✓]贪心 数组🔴🀄️open in new window 🔗open in new window29
572另一棵树的子树[✓] 深度优先搜索 二叉树 2+🟢🀄️open in new window 🔗open in new window28
445两数相加 II[✓] 链表 数学🟠🀄️open in new window 🔗open in new window28
114二叉树展开为链表[✓] 深度优先搜索 2+🟠🀄️open in new window 🔗open in new window28
384打乱数组数组 数学 随机化🟠🀄️open in new window 🔗open in new window28
328奇偶链表[✓]链表🟠🀄️open in new window 🔗open in new window28
91解码方法字符串 动态规划🟠🀄️open in new window 🔗open in new window28
329矩阵中的最长递增路径深度优先搜索 广度优先搜索 5+🔴🀄️open in new window 🔗open in new window28
208实现 Trie (前缀树)[✓]设计 字典树 哈希表 1+🟠🀄️open in new window 🔗open in new window27
9回文数[✓]数学🟢🀄️open in new window 🔗open in new window27
10正则表达式匹配[✓]递归 字符串 动态规划🔴🀄️open in new window 🔗open in new window26
295数据流的中位数[✓]设计 双指针 数据流 2+🔴🀄️open in new window 🔗open in new window26
189轮转数组[✓]数组 数学 双指针🟠🀄️open in new window 🔗open in new window26
347前 K 个高频元素[✓]数组 哈希表 分治 5+🟠🀄️open in new window 🔗open in new window25
106从中序与后序遍历序列构造二叉树[✓] 数组 哈希表 2+🟠🀄️open in new window 🔗open in new window25
213打家劫舍 II数组 动态规划🟠🀄️open in new window 🔗open in new window25
287寻找重复数[✓]位运算 数组 双指针 1+🟠🀄️open in new window 🔗open in new window25
剑指 Offer 27二叉树的镜像[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window25
剑指 Offer 29顺时针打印矩阵[✓]数组 矩阵 模拟🟢🀄️open in new window24
96不同的二叉搜索树[✓] 二叉搜索树 数学 2+🟠🀄️open in new window 🔗open in new window24
120三角形最小路径和[✓]数组 动态规划🟠🀄️open in new window 🔗open in new window23
400第 N 位数字[✓]数学 二分查找🟠🀄️open in new window 🔗open in new window23
1004最大连续1的个数 III[✓]数组 二分查找 前缀和 1+🟠🀄️open in new window 🔗open in new window22
349两个数组的交集数组 哈希表 双指针 2+🟢🀄️open in new window 🔗open in new window22
剑指 Offer 61扑克牌中的顺子[✓]数组 排序🟢🀄️open in new window21
85最大矩形[✓] 数组 动态规划 2+🔴🀄️open in new window 🔗open in new window21
1047删除字符串中的所有相邻重复项[✓] 字符串🟢🀄️open in new window 🔗open in new window21
71简化路径[✓] 字符串🟠🀄️open in new window 🔗open in new window21
67924 点游戏数组 数学 回溯🔴🀄️open in new window 🔗open in new window21
678有效的括号字符串[✓] 贪心 字符串 1+🟠🀄️open in new window 🔗open in new window21
剑指 Offer 52两个链表的第一个公共节点[✓]哈希表 链表 双指针🟢🀄️open in new window21
887鸡蛋掉落数学 二分查找 动态规划🔴🀄️open in new window 🔗open in new window21
111二叉树的最小深度[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window20
1444切披萨的方案数记忆化搜索 数组 动态规划 1+🔴🀄️open in new window 🔗open in new window20
611有效三角形的个数[✓]贪心 数组 双指针 2+🟠🀄️open in new window 🔗open in new window20
134加油站[✓]贪心 数组🟠🀄️open in new window 🔗open in new window20
剑指 Offer 39数组中出现次数超过一半的数字[✓]数组 哈希表 分治 2+🟢🀄️open in new window20
168Excel 表列名称数学 字符串🟢🀄️open in new window 🔗open in new window20
44通配符匹配[✓]贪心 递归 字符串 1+🔴🀄️open in new window 🔗open in new window19
556下一个更大元素 III数学 双指针 字符串🟠🀄️open in new window 🔗open in new window19
210课程表 II[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window19
673最长递增子序列的个数树状数组 线段树 数组 1+🟠🀄️open in new window 🔗open in new window19
442数组中重复的数据[✓]数组 哈希表🟠🀄️open in new window 🔗open in new window19
509斐波那契数[✓]递归 记忆化搜索 数学 1+🟢🀄️open in new window 🔗open in new window19
395至少有 K 个重复字符的最长子串哈希表 字符串 分治 1+🟠🀄️open in new window 🔗open in new window18
63不同路径 II[✓]数组 动态规划 矩阵🟠🀄️open in new window 🔗open in new window18
279完全平方数[✓]广度优先搜索 数学 动态规划🟠🀄️open in new window 🔗open in new window18
443压缩字符串[✓]双指针 字符串🟠🀄️open in new window 🔗open in new window18
剑指 Offer 45把数组排成最小的数[✓]贪心 字符串 排序🟠🀄️open in new window18
37解数独[✓]数组 哈希表 回溯 1+🔴🀄️open in new window 🔗open in new window18
459重复的子字符串[✓]字符串 字符串匹配🟢🀄️open in new window 🔗open in new window18
剑指 Offer 34二叉树中和为某一值的路径[✓] 深度优先搜索 回溯 1+🟠🀄️open in new window18
剑指 Offer 53在排序数组中查找数字 I[✓]数组 二分查找🟢🀄️open in new window18
86分隔链表[✓]链表 双指针🟠🀄️open in new window 🔗open in new window18
494目标和[✓]数组 动态规划 回溯🟠🀄️open in new window 🔗open in new window17
516最长回文子序列[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window17
115不同的子序列字符串 动态规划🔴🀄️open in new window 🔗open in new window17
84柱状图中最大的矩形[✓] 数组 单调栈🔴🀄️open in new window 🔗open in new window17
97交错字符串[✓]字符串 动态规划🟠🀄️open in new window 🔗open in new window17
264丑数 II[✓]哈希表 数学 动态规划 1+🟠🀄️open in new window 🔗open in new window17
剑指 Offer 48最长不含重复字符的子字符串[✓]哈希表 字符串 滑动窗口🟠🀄️open in new window17
242有效的字母异位词[✓]哈希表 字符串 排序🟢🀄️open in new window 🔗open in new window17
344反转字符串[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window17
557反转字符串中的单词 III[✓]双指针 字符串🟢🀄️open in new window 🔗open in new window17
670最大交换[✓]贪心 数学🟠🀄️open in new window 🔗open in new window17
剑指 Offer 11旋转数组的最小数字[✓]数组 二分查找🟢🀄️open in new window17
191位1的个数[✓]位运算 分治🟢🀄️open in new window 🔗open in new window17

相关信息

数据来源:CodeTop | 企业题库open in new window