刷题索引
LeetCode 热题 🔥 100
简单题
- 1.两数之和
- 206.反转链表
- 20.有效的括号
- 53.最大子数组和
- 21.合并两个有序链表
- 70.爬楼梯
- 121.买卖股票的最佳时机
- 283.移动零
- 141.环形链表
- 104.二叉树的最大深度
- 94.二叉树的中序遍历
- 101.对称二叉树
- 136.只出现一次的数字
- 169.多数元素
- 160.相交链表
- 226.翻转二叉树
- 234.回文链表
- 155.最小栈
- 338.比特位计数
- 617.合并二叉树
- 461.汉明距离
- 543.二叉树的直径
- 448.找到所有数组中消失的数字
中等题
- 3.无重复字符的最长子串
- 2.两数相加
- 19.删除链表的倒数第 N 个结点
- 5.最长回文子串
- 34.在排序数组中查找元素的第一个和最后一个位置
- 15.三数之和
- 17.电话号码的字母组合
- 11.盛最多水的容器
- 46.全排列
- 198.打家劫舍
- 22.括号生成
- 55.跳跃游戏
- 102.二叉树的层序遍历
- 33.搜索旋转排序数组
- 62.不同路径
- 56.合并区间
- 215.数组中的第 K 个最大元素
- 78.子集
- 200.岛屿数量
- 48.旋转图像
- 300.最长递增子序列
- 64.最小路径和
- 39.组合总和
- 98.验证二叉搜索树
- 75.颜色分类
- 142.环形链表 II
- 322.零钱兑换
- 31.下一个排列
- 146.LRU 缓存
- 347.前 K 个高频元素
- 739.每日温度
- 105.从前序与中序遍历序列构造二叉树
- 114.二叉树展开为链表
- 236.二叉树的最近公共祖先
- 79.单词搜索
- 49.字母异位词分组
- 96.不同的二叉搜索树
- 139.单词拆分
- 394.字符串解码
- 148.排序链表
- 152.乘积最大子数组
- 128.最长连续序列
- 287.寻找重复数
- 279.完全平方数
- 438.找到字符串中所有字母异位词
- 494.目标和
- 416.分割等和子集
- 240.搜索二维矩阵 II
- 560.和为 K 的子数组
- 221.最大正方形
- 309.最佳买卖股票时机含冷冻期
- 437.路径总和 III
- 208.实现 Trie (前缀树)
- 207.课程表
- 647.回文子串
- 337.打家劫舍 III
- 238.除自身以外数组的乘积
- 538.把二叉搜索树转换为累加树
- 581.最短无序连续子数组
- 406.根据身高重建队列
- 399.除法求值
- 621.任务调度器
- 253.会议室 II
困难题
- 4.寻找两个正序数组的中位数
- 42.接雨水
- 23.合并 K 个升序链表
- 76.最小覆盖子串
- 239.滑动窗口最大值
- 72.编辑距离
- 32.最长有效括号
- 10.正则表达式匹配
- 84.柱状图中最大的矩形
- 124.二叉树中的最大路径和
- 297.二叉树的序列化与反序列化
- 85.最大矩形
- 312.戳气球
- 301.删除无效的括号
LeetCode 精选 TOP 面试题
简单
- 1.两数之和
- 13.罗马数字转整数
- 14.最长公共前缀
- 20.有效的括号
- 21.合并两个有序链表
- 26.删除有序数组中的重复项
- 28.实现 strStr()
- 53.最大子数组和
- 66.加一
- 69.x 的平方根
- 70.爬楼梯
- 88.合并两个有序数组
- 94.二叉树的中序遍历
- 101.对称二叉树
- 104.二叉树的最大深度
- 108.将有序数组转换为二叉搜索树
- 118.杨辉三角
- 121.买卖股票的最佳时机
- 125.验证回文串
- 136.只出现一次的数字
- 141.环形链表
- 155.最小栈
- 160.相交链表
- 163.缺失的区间
- 169.多数元素
- 171.Excel 表列序号
- 190.颠倒二进制位
- 191.位 1 的个数
- 202.快乐数
- 206.反转链表
- 217.存在重复元素
- 234.回文链表
- 237.删除链表中的节点
- 242.有效的字母异位词
- 268.丢失的数字
- 283.移动零
- 326.3 的幂
- 344.反转字符串
- 350.两个数组的交集 II
- 387.字符串中的第一个唯一字符
- 412.Fizz Buzz
中等
- 2.两数相加
- 3.无重复字符的最长子串
- 5.最长回文子串
- 7.整数反转
- 8.字符串转换整数 (atoi)
- 11.盛最多水的容器
- 15.三数之和
- 17.电话号码的字母组合
- 19.删除链表的倒数第 N 个结点
- 22.括号生成
- 29.两数相除
- 33.搜索旋转排序数组
- 34.在排序数组中查找元素的第一个和最后一个位置
- 36.有效的数独
- 38.外观数列
- 46.全排列
- 48.旋转图像
- 49.字母异位词分组
- 50.Pow(x, n)
- 54.螺旋矩阵
- 55.跳跃游戏
- 56.合并区间
- 62.不同路径
- 73.矩阵置零
- 75.颜色分类
- 78.子集
- 79.单词搜索
- 91.解码方法
- 98.验证二叉搜索树
- 102.二叉树的层序遍历
- 103.二叉树的锯齿形层序遍历
- 105.从前序与中序遍历序列构造二叉树
- 116.填充每个节点的下一个右侧节点指针
- 122.买卖股票的最佳时机 II
- 128.最长连续序列
- 130.被围绕的区域
- 131.分割回文串
- 134.加油站
- 138.复制带随机指针的链表
- 139.单词拆分
- 146.LRU 缓存
- 148.排序链表
- 150.逆波兰表达式求值
- 152.乘积最大子数组
- 162.寻找峰值
- 166.分数到小数
- 172.阶乘后的零
- 179.最大数
- 189.轮转数组
- 198.打家劫舍
- 200.岛屿数量
- 204.计数质数
- 207.课程表
- 208.实现 Trie (前缀树)
- 210.课程表 II
- 215.数组中的第 K 个最大元素
- 227.基本计算器 II
- 230.二叉搜索树中第 K 小的元素
- 236.二叉树的最近公共祖先
- 238.除自身以外数组的乘积
- 240.搜索二维矩阵 II
- 251.展开二维向量
- 253.会议室 II
- 277.搜寻名人
- 279.完全平方数
- 285.二叉搜索树中的中序后继
- 287.寻找重复数
- 289.生命游戏
- 300.最长递增子序列
- 322.零钱兑换
- 324.摆动排序 II
- 328.奇偶链表
- 334.递增的三元子序列
- 340.至多包含 K 个不同字符的最长子串
- 341.扁平化嵌套列表迭代器
- 347.前 K 个高频元素
- 348.设计井字棋
- 371.两整数之和
- 378.有序矩阵中第 K 小的元素
- 380.O(1) 时间插入、删除和获取随机元素
- 384.打乱数组
- 395.至少有 K 个重复字符的最长子串
- 454.四数相加 II
困难
- 4.寻找两个正序数组的中位数
- 10.正则表达式匹配
- 23.合并 K 个升序链表
- 41.缺失的第一个正数
- 42.接雨水
- 44.通配符匹配
- 76.最小覆盖子串
- 84.柱状图中最大的矩形
- 124.二叉树中的最大路径和
- 127.单词接龙
- 140.单词拆分 II
- 149.直线上最多的点数
- 212.单词搜索 II
- 218.天际线问题
- 239.滑动窗口最大值
- 269.火星词典
- 295.数据流的中位数
- 297.二叉树的序列化与反序列化
- 308.二维区域和检索 - 可变
- 315.计算右侧小于当前元素的个数
- 329.矩阵中的最长递增路径
剑指 offer 第二版
简单
- 剑指 Offer 68 - II.二叉树的最近公共祖先
- 剑指 Offer 68 - I.二叉搜索树的最近公共祖先
- 剑指 Offer 65.不用加减乘除做加法
- 剑指 Offer 62.圆圈中最后剩下的数字
- 剑指 Offer 61.扑克牌中的顺子
- 剑指 Offer 58 - II.左旋转字符串
- 剑指 Offer 58 - I.翻转单词顺序
- 剑指 Offer 57 - II.和为 s 的连续正数序列
- 剑指 Offer 57.和为 s 的两个数字
- 剑指 Offer 55 - II.平衡二叉树
- 剑指 Offer 55 - I.二叉树的深度
- 剑指 Offer 54.二叉搜索树的第 k 大节点
- 剑指 Offer 53 - II.0 ~ n-1 中缺失的数字
- 剑指 Offer 53 - I.在排序数组中查找数字 I
- 剑指 Offer 52.两个链表的第一个公共节点
- 剑指 Offer 50.第一个只出现一次的字符
- 剑指 Offer 42.连续子数组的最大和
- 剑指 Offer 40.最小的 k 个数
- 剑指 Offer 39.数组中出现次数超过一半的数字
- 剑指 Offer 32 - II.从上到下打印二叉树 II
- 剑指 Offer 30.包含 min 函数的栈
- 剑指 Offer 29.顺时针打印矩阵
- 剑指 Offer 28.对称的二叉树
- 剑指 Offer 27.二叉树的镜像
- 剑指 Offer 25.合并两个排序的链表
- 剑指 Offer 24.反转链表
- 剑指 Offer 22.链表中倒数第 k 个节点
- 剑指 Offer 21.调整数组顺序使奇数位于偶数前面
- 剑指 Offer 18.删除链表的节点
- 剑指 Offer 17.打印从 1 到最大的 n 位数
- 剑指 Offer 15.二进制中 1 的个数
- 剑指 Offer 11.旋转数组的最小数字
- 剑指 Offer 10- II.青蛙跳台阶问题
- 剑指 Offer 10- I.斐波那契数列
- 剑指 Offer 09.用两个栈实现队列
- 剑指 Offer 06.从尾到头打印链表
- 剑指 Offer 05.替换空格
- 剑指 Offer 03.数组中重复的数字
中等
- 面试题 32 - I.从上到下打印二叉树
- 剑指 Offer 67.把字符串转换成整数
- 剑指 Offer 66.构建乘积数组
- 剑指 Offer 64.求 1+2+…+n
- 剑指 Offer 63.股票的最大利润
- 剑指 Offer 60.n 个骰子的点数
- 剑指 Offer 59 - II.队列的最大值
- 剑指 Offer 56 - II.数组中数字出现的次数 II
- 剑指 Offer 56 - I.数组中数字出现的次数
- 剑指 Offer 49.丑数
- 剑指 Offer 48.最长不含重复字符的子字符串
- 剑指 Offer 47.礼物的最大价值
- 剑指 Offer 46.把数字翻译成字符串
- 剑指 Offer 45.把数组排成最小的数
- 剑指 Offer 44.数字序列中某一位的数字
- 剑指 Offer 38.字符串的排列
- 剑指 Offer 36.二叉搜索树与双向链表
- 剑指 Offer 35.复杂链表的复制
- 剑指 Offer 34.二叉树中和为某一值的路径
- 剑指 Offer 33.二叉搜索树的后序遍历序列
- 剑指 Offer 32 - III.从上到下打印二叉树 III
- 剑指 Offer 31.栈的压入、弹出序列
- 剑指 Offer 26.树的子结构
- 剑指 Offer 20.表示数值的字符串
- 剑指 Offer 16.数值的整数次方
- 剑指 Offer 14- II.剪绳子 II
- 剑指 Offer 14- I.剪绳子
- 剑指 Offer 13.机器人的运动范围
- 剑指 Offer 12.矩阵中的路径
- 剑指 Offer 07.重建二叉树
- 剑指 Offer 04.二维数组中的查找
困难
- 面试题 19.正则表达式匹配
- 剑指 Offer 59 - I.滑动窗口的最大值
- 剑指 Offer 51.数组中的逆序对
- 剑指 Offer 43.1 ~ n 整数中 1 出现的次数
- 剑指 Offer 41.数据流中的中位数
- 剑指 Offer 37.序列化二叉树
剑指 offer 专项突击版
简单
- 剑指 Offer II 101.分割等和子集
- 剑指 Offer II 088.爬楼梯的最少成本
- 剑指 Offer II 075.数组相对排序
- 剑指 Offer II 072.求平方根
- 剑指 Offer II 069.山峰数组的顶部
- 剑指 Offer II 068.查找插入位置
- 剑指 Offer II 059.数据流的第 K 大数值
- 剑指 Offer II 056.二叉搜索树中两个节点之和
- 剑指 Offer II 052.展平二叉搜索树
- 剑指 Offer II 042.最近请求次数
- 剑指 Offer II 041.滑动窗口的平均值
- 剑指 Offer II 034.外星语言是否排序
- 剑指 Offer II 032.有效的变位词
- 剑指 Offer II 027.回文链表
- 剑指 Offer II 024.反转链表
- 剑指 Offer II 023.两个链表的第一个重合节点
- 剑指 Offer II 019.最多删除一个字符得到回文
- 剑指 Offer II 018.有效的回文
- 剑指 Offer II 012.左右两边子数组的和相等
- 剑指 Offer II 006.排序数组中两个数字之和
- 剑指 Offer II 003.前 n 个数字二进制中 1 的个数
- 剑指 Offer II 002.二进制加法
- 剑指 Offer II 001.整数除法
中等
- 剑指 Offer II 119.最长连续序列
- 剑指 Offer II 118.多余的边
- 剑指 Offer II 116.省份数量
- 剑指 Offer II 115.重建序列
- 剑指 Offer II 113.课程顺序
- 剑指 Offer II 111.计算除法
- 剑指 Offer II 110.所有路径
- 剑指 Offer II 109.开密码锁
- 剑指 Offer II 107.矩阵中的距离
- 剑指 Offer II 106.二分图
- 剑指 Offer II 105.岛屿的最大面积
- 剑指 Offer II 104.排列的数目
- 剑指 Offer II 103.最少的硬币数目
- 剑指 Offer II 102.加减的目标值
- 剑指 Offer II 100.三角形中最小路径之和
- 剑指 Offer II 099.最小路径之和
- 剑指 Offer II 098.路径的数目
- 剑指 Offer II 096.字符串交织
- 剑指 Offer II 095.最长公共子序列
- 剑指 Offer II 093.最长斐波那契数列
- 剑指 Offer II 092.翻转字符
- 剑指 Offer II 091.粉刷房子
- 剑指 Offer II 090.环形房屋偷盗
- 剑指 Offer II 089.房屋偷盗
- 剑指 Offer II 087.复原 IP
- 剑指 Offer II 086.分割回文子字符串
- 剑指 Offer II 085.生成匹配的括号
- 剑指 Offer II 084.含有重复元素集合的全排列
- 剑指 Offer II 083.没有重复元素集合的全排列
- 剑指 Offer II 082.含有重复元素集合的组合
- 剑指 Offer II 081.允许重复选择元素的组合
- 剑指 Offer II 080.含有 k 个元素的组合
- 剑指 Offer II 079.所有子集
- 剑指 Offer II 077.链表排序
- 剑指 Offer II 076.数组中的第 k 大的数字
- 剑指 Offer II 074.合并区间
- 剑指 Offer II 073.狒狒吃香蕉
- 剑指 Offer II 071.按权重生成随机数
- 剑指 Offer II 070.排序数组中只出现一次的数字
- 剑指 Offer II 067.最大的异或
- 剑指 Offer II 066.单词之和
- 剑指 Offer II 065.最短的单词编码
- 剑指 Offer II 064.神奇的字典
- 剑指 Offer II 063.替换单词
- 剑指 Offer II 062.实现前缀树
- 剑指 Offer II 061.和最小的 k 个数对
- 剑指 Offer II 060.出现频率最高的 k 个数字
- 剑指 Offer II 058.日程表
- 剑指 Offer II 057.值和下标之差都在给定的范围内
- 剑指 Offer II 055.二叉搜索树迭代器
- 剑指 Offer II 054.所有大于等于节点的值之和
- 剑指 Offer II 053.二叉搜索树中的中序后继
- 剑指 Offer II 050.向下的路径节点之和
- 剑指 Offer II 049.从根节点到叶节点的路径数字之和
- 剑指 Offer II 047.二叉树剪枝
- 剑指 Offer II 046.二叉树的右侧视图
- 剑指 Offer II 045.二叉树最底层最左边的值
- 剑指 Offer II 044.二叉树每层的最大值
- 剑指 Offer II 043.往完全二叉树添加节点
- 剑指 Offer II 038.每日温度
- 剑指 Offer II 037.小行星碰撞
- 剑指 Offer II 036.后缀表达式
- 剑指 Offer II 035.最小时间差
- 剑指 Offer II 033.变位词组
- 剑指 Offer II 031.最近最少使用缓存
- 剑指 Offer II 030.插入、删除和随机访问都是 O(1) 的容器
- 剑指 Offer II 029.排序的循环链表
- 剑指 Offer II 028.展平多级双向链表
- 剑指 Offer II 026.重排链表
- 剑指 Offer II 025.链表中的两数相加
- 剑指 Offer II 022.链表中环的入口节点
- 剑指 Offer II 021.删除链表的倒数第 n 个结点
- 剑指 Offer II 020.回文子字符串的个数
- 剑指 Offer II 016.不含重复字符的最长子字符串
- 剑指 Offer II 015.字符串中的所有变位词
- 剑指 Offer II 014.字符串中的变位词
- 剑指 Offer II 013.二维子矩阵的和
- 剑指 Offer II 011.0 和 1 个数相同的子数组
- 剑指 Offer II 010.和为 k 的子数组
- 剑指 Offer II 009.乘积小于 K 的子数组
- 剑指 Offer II 008.和大于等于 target 的最短子数组
- 剑指 Offer II 007.数组中和为 0 的三个数
- 剑指 Offer II 005.单词长度的最大乘积
- 剑指 Offer II 004.只出现一次的数字