# 中等难度题目合集

中等题目是力扣比例最大的部分，因此这部分我的题解也是最多的。 大家不要太过追求难题，先把中等难度题目做熟了再说。

这部分的题目要不需要我们挖掘题目的内含信息， 将其抽象成简单题目。 要么是一些写起来比较麻烦的题目， 一些人编码能力不行就挂了。因此大家一定要自己做， 即使看了题解”会了“，也要自己码一遍。自己不亲自写一遍，里面的细节永远不知道。

以下是我列举的经典题目：

- [面试题 17.09. 第 k 个数](../../problems/get-kth-magic-number-lcci.md)

- [0002. 两数相加](../problems/2.add-two-numbers.md)
- [0003. 无重复字符的最长子串](../problems/3.longest-substring-without-repeating-characters.md)
- [0005. 最长回文子串](../problems/5.longest-palindromic-substring.md)
- [0011. 盛最多水的容器](../problems/11.container-with-most-water.md)
- [0015. 三数之和](../problems/15.3sum.md)
- [0017. 电话号码的字母组合](../problems/17.Letter-Combinations-of-a-Phone-Number.md)
- [0019. 删除链表的倒数第 N 个节点](../problems/19.removeNthNodeFromEndofList.md)
- [0022. 括号生成](../problems/22.generate-parentheses.md)
- [0024. 两两交换链表中的节点](../problems/24.swapNodesInPairs.md)
- [0029. 两数相除](../problems/29.divide-two-integers.md)
- [0031. 下一个排列](../problems/31.next-permutation.md)
- [0033. 搜索旋转排序数组](../problems/33.search-in-rotated-sorted-array.md)
- [0039. 组合总和](../problems/39.combination-sum.md)
- [0040. 组合总和 II](../problems/40.combination-sum-ii.md)
- [0046. 全排列](../problems/46.permutations.md)
- [0047. 全排列 II](../problems/47.permutations-ii.md)
- [0048. 旋转图像](../problems/48.rotate-image.md)
- [0049. 字母异位词分组](../problems/49.group-anagrams.md)
- [0050. Pow(x, n)](../problems/50.pow-x-n.md)
- [0055. 跳跃游戏](../problems/55.jump-game.md)
- [0056. 合并区间](../problems/56.merge-intervals.md)
- [0060. 第 k 个排列](../problems/60.permutation-sequence.md)
- [0062. 不同路径](../problems/62.unique-paths.md)
- [0073. 矩阵置零](../problems/73.set-matrix-zeroes.md)
- [0075. 颜色分类](../problems/75.sort-colors.md)
- [0078. 子集](../problems/78.subsets.md)
- [0079. 单词搜索](../problems/79.word-search.md)
- [0080. 删除排序数组中的重复项 II](../problems/80.remove-duplicates-from-sorted-array-ii.md)
- [0086. 分隔链表](../problems/86.partition-list.md)
- [0090. 子集 II](../problems/90.subsets-ii.md)
- [0091. 解码方法](../problems/91.decode-ways.md)
- [0092. 反转链表 II](../problems/92.reverse-linked-list-ii.md)
- [0094. 二叉树的中序遍历](../problems/94.binary-tree-inorder-traversal.md)
- [0095. 不同的二叉搜索树 II](../problems/95.unique-binary-search-trees-ii.md)
- [0096. 不同的二叉搜索树](../problems/96.unique-binary-search-trees.md)
- [0098. 验证二叉搜索树](../problems/98.validate-binary-search-tree.md)
- [0102. 二叉树的层序遍历](../problems/102.binary-tree-level-order-traversal.md)
- [0103. 二叉树的锯齿形层次遍历](../problems/103.binary-tree-zigzag-level-order-traversal.md)
- [0113. 路径总和 II](../problems/113.path-sum-ii.md)
- [0129. 求根到叶子节点数字之和](../problems/129.sum-root-to-leaf-numbers.md)
- [0130. 被围绕的区域](../problems/130.surrounded-regions.md)
- [0131. 分割回文串](../problems/131.palindrome-partitioning.md)
- [0139. 单词拆分](../problems/139.word-break.md)
- [0144. 二叉树的前序遍历](../problems/144.binary-tree-preorder-traversal.md)
- [0150. 逆波兰表达式求值](../problems/150.evaluate-reverse-polish-notation.md)
- [0152. 乘积最大子数组](../problems/152.maximum-product-subarray.md)
- [0199. 二叉树的右视图](../problems/199.binary-tree-right-side-view.md)
- [0200. 岛屿数量](../problems/200.number-of-islands.md)
- [0201. 数字范围按位与](../problems/201.bitwise-and-of-numbers-range.md)
- [0208. 实现 Trie (前缀树)](../problems/208.implement-trie-prefix-tree.md)
- [0209. 长度最小的子数组](../problems/209.minimum-size-subarray-sum.md)
- [0211. 添加与搜索单词 \* 数据结构设计](../problems/211.add-and-search-word-data-structure-design.md)
- [0215. 数组中的第 K 个最大元素](../problems/215.kth-largest-element-in-an-array.md)
- [0221. 最大正方形](../problems/221.maximal-square.md)
- [0229. 求众数 II](../problems/229.majority-element-ii.md)
- [0230. 二叉搜索树中第 K 小的元素](../problems/230.kth-smallest-element-in-a-bst.md)
- [0236. 二叉树的最近公共祖先](../problems/236.lowest-common-ancestor-of-a-binary-tree.md)
- [0238. 除自身以外数组的乘积](../problems/238.product-of-array-except-self.md)
- [0240. 搜索二维矩阵 II](../problems/240.search-a-2-d-matrix-ii.md)
- [0279. 完全平方数](../problems/279.perfect-squares.md)
- [0309. 最佳买卖股票时机含冷冻期](../problems/309.best-time-to-buy-and-sell-stock-with-cooldown.md)
- [0322. 零钱兑换](../problems/322.coin-change.md)
- [0328. 奇偶链表](../problems/328.odd-even-linked-list.md)
- [0334. 递增的三元子序列](../problems/334.increasing-triplet-subsequence.md)
- [0337. 打家劫舍 III](../problems/337.house-robber-iii.md)
- [0343. 整数拆分](../problems/343.integer-break.md)
- [0365. 水壶问题](../problems/365.water-and-jug-problem.md)
- [0378. 有序矩阵中第 K 小的元素](../problems/378.kth-smallest-element-in-a-sorted-matrix.md)
- [0380. 常数时间插入、删除和获取随机元素](../problems/380.insert-delete-getrandom-o1.md)
- [0416. 分割等和子集](../problems/416.partition-equal-subset-sum.md)
- [0445. 两数相加 II](../problems/445.add-two-numbers-ii.md)
- [0454. 四数相加 II](../problems/454.4-sum-ii.md)
- [0494. 目标和](../problems/494.target-sum.md)
- [0516. 最长回文子序列](../problems/516.longest-palindromic-subsequence.md)
- [0518. 零钱兑换 II](../problems/518.coin-change-2.md)
- [0547. 朋友圈](../problems/547.friend-circles.md)
- [0560. 和为 K 的子数组](../problems/560.subarray-sum-equals-k.md)
- [0609. 在系统中查找重复文件](../problems/609.find-duplicate-file-in-system.md)
- [0611. 有效三角形的个数](../problems/611.valid-triangle-number.md)
- [0686. 重复叠加字符串匹配](../problems/686.repeated-string-match.md) 🆕
- [0718. 最长重复子数组](../problems/718.maximum-length-of-repeated-subarray.md)
- [0754. 到达终点数字](../problems/754.reach-a-number.md)
- [0785. 判断二分图](../problems/785.is-graph-bipartite.md)
- [0816. 模糊坐标](../problems/816.ambiguous-coordinates.md) 🆕
- [0820. 单词的压缩编码](../problems/820.short-encoding-of-words.md)
- [0875. 爱吃香蕉的珂珂](../problems/875.koko-eating-bananas.md)
- [0877. 石子游戏](../problems/877.stone-game.md)
- [0886. 可能的二分法](../problems/886.possible-bipartition.md)
- [0900. RLE 迭代器](../problems/900.rle-iterator.md)
- [0912. 排序数组](../problems/912.sort-an-array.md)
- [0935. 骑士拨号器](../problems/935.knight-dialer.md)
- [0978. 最长湍流子数组](../problems/978.longest-turbulent-subarray.md) 🆕
- [1011. 在 D 天内送达包裹的能力](../problems/1011.capacity-to-ship-packages-within-d-days.md)
- [1014. 最佳观光组合](../problems/1014.best-sightseeing-pair.md)
- [1015. 可被 K 整除的最小整数](../problems/1015.smallest-integer-divisible-by-k.md)
- [1019. 链表中的下一个更大节点](../problems/1019.next-greater-node-in-linked-list.md)
- [1020. 飞地的数量](../problems/1020.number-of-enclaves.md)
- [1023. 驼峰式匹配](../problems/1023.camelcase-matching.md)
- [1031. 两个非重叠子数组的最大和](../problems/1031.maximum-sum-of-two-non-overlapping-subarrays.md)
- [1104. 二叉树寻路](../problems/1104.path-in-zigzag-labelled-binary-tree.md)
- [1131.绝对值表达式的最大值](../problems/1131.maximum-of-absolute-value-expression.md)
- [1186. 删除一次得到子数组最大和](../problems/1186.maximum-subarray-sum-with-one-deletion.md)
- [1218. 最长定差子序列](../problems/1218.longest-arithmetic-subsequence-of-given-difference.md)
- [1227. 飞机座位分配概率](../problems/1227.airplane-seat-assignment-probability.md)
- [1261. 在受污染的二叉树中查找元素](../problems/1261.find-elements-in-a-contaminated-binary-tree.md)
- [1262. 可被三整除的最大和](../problems/1262.greatest-sum-divisible-by-three.md)
- [1297. 子串的最大出现次数](../problems/1297.maximum-number-of-occurrences-of-a-substring.md)
- [1310. 子数组异或查询](../problems/1310.xor-queries-of-a-subarray.md)
- [1334. 阈值距离内邻居最少的城市](../problems/1334.find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.md)
- [1371.每个元音包含偶数次的最长子字符串](../problems/1371.find-the-longest-substring-containing-vowels-in-even-counts.md)
- [1558. 得到目标数组的最少函数调用次数](../problems/1558.minimum-numbers-of-function-calls-to-make-target-array.md) 🆕
- [1631.path-with-minimum-effort](../problems/1631.path-with-minimum-effort.md) 🆕
