# 第五章 - 高频考题(中等) # 中等难度题目合集 中等题目是力扣比例最大的部分,因此这部分我的题解也是最多的。 大家不要太过追求难题,先把中等难度题目做熟了再说。 这部分的题目要不需要我们挖掘题目的内含信息, 将其抽象成简单题目。 要么是一些写起来比较麻烦的题目, 一些人编码能力不行就挂了。因此大家一定要自己做, 即使看了题解”会了“,也要自己码一遍。自己不亲自写一遍,里面的细节永远不知道。 - [面试题 17.09. 第 k 个数](get-kth-magic-number-lcci.md) - [0002.add-two-numbers](2.add-two-numbers.html) - [0003.longest-substring-without-repeating-characters](3.longest-substring-without-repeating-characters.html) - [0005.longest-palindromic-substring](5.longest-palindromic-substring.html) - [0011.container-with-most-water](11.container-with-most-water.html) - [0015.3-sum](15.3sum.html) - [0017.Letter-Combinations-of-a-Phone-Number](17.Letter-Combinations-of-a-Phone-Number.html) 🆕 - [0019. Remove Nth Node From End of List](19.removeNthNodeFromEndofList.html) - [0022.generate-parentheses.md](22.generate-parentheses.html) 🆕 - [0024. Swap Nodes In Pairs](24.swapNodesInPairs.html) - [0029.divide-two-integers](29.divide-two-integers.html) - [0031.next-permutation](31.next-permutation.html) - [0033.search-in-rotated-sorted-array](33.search-in-rotated-sorted-array.html) - [0039.combination-sum](39.combination-sum.html) - [0040.combination-sum-ii](40.combination-sum-ii.html) - [0046.permutations](46.permutations.html) - [0047.permutations-ii](47.permutations-ii.html) - [0048.rotate-image](48.rotate-image.html) - [0049.group-anagrams](49.group-anagrams.html) - [0050.pow-x-n](50.pow-x-n.html) 🆕 - [0055.jump-game](55.jump-game.html) - [0056.merge-intervals](56.merge-intervals.html) - [0060.permutation-sequence](60.permutation-sequence.html) 🆕 - [0062.unique-paths](62.unique-paths.html) 🖊 - [0073.set-matrix-zeroes](73.set-matrix-zeroes.html) - [0075.sort-colors](75.sort-colors.html) - [0078.subsets](78.subsets.html) - [0079.word-search](79.word-search.html) - [0080.remove-duplicates-from-sorted-array-ii](80.remove-duplicates-from-sorted-array-ii.html) 🆕 - [0086.partition-list](86.partition-list.html) - [0090.subsets-ii](90.subsets-ii.html) - [0091.decode-ways](91.decode-ways.html) - [0092.reverse-linked-list-ii](92.reverse-linked-list-ii.html) 🖊 - [0094.binary-tree-inorder-traversal](94.binary-tree-inorder-traversal.html) - [0095.unique-binary-search-trees-ii](95.unique-binary-search-trees-ii.html) 🆕 - [0096.unique-binary-search-trees](96.unique-binary-search-trees.html) 🆕 - [0098.validate-binary-search-tree](98.validate-binary-search-tree.html) - [0102.binary-tree-level-order-traversal](102.binary-tree-level-order-traversal.html) - [0103.binary-tree-zigzag-level-order-traversal](103.binary-tree-zigzag-level-order-traversal.html) - [105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.md](105.Construct-Binary-Tree-from-Preorder-and-Inorder-Traversal.html) - [0113.path-sum-ii](113.path-sum-ii.html) - [0129.sum-root-to-leaf-numbers](129.sum-root-to-leaf-numbers.html) - [0130.surrounded-regions](130.surrounded-regions.html) - [0131.palindrome-partitioning](131.palindrome-partitioning.html) - [0139.word-break](139.word-break.html) - [0144.binary-tree-preorder-traversal](144.binary-tree-preorder-traversal.html) - [0150.evaluate-reverse-polish-notation](150.evaluate-reverse-polish-notation.html) - [0152.maximum-product-subarray](152.maximum-product-subarray.html) 🖊 - [0199.binary-tree-right-side-view](199.binary-tree-right-side-view.html) - [0200.number-of-islands](200.number-of-islands.html) 🆕 - [0201.bitwise-and-of-numbers-range](201.bitwise-and-of-numbers-range.html) 🖊 - [0208.implement-trie-prefix-tree](208.implement-trie-prefix-tree.html) - [0209.minimum-size-subarray-sum](209.minimum-size-subarray-sum.html) - [0211.add-and-search-word-data-structure-design](211.add-and-search-word-data-structure-design.html) 🆕 - [0215.kth-largest-element-in-an-array](215.kth-largest-element-in-an-array.html) 🆕 - [0221.maximal-square](221.maximal-square.html) - [0229.majority-element-ii](229.majority-element-ii.html) 🆕 - [0230.kth-smallest-element-in-a-bst](230.kth-smallest-element-in-a-bst.html) - [0236.lowest-common-ancestor-of-a-binary-tree](236.lowest-common-ancestor-of-a-binary-tree.html) - [0238.product-of-array-except-self](238.product-of-array-except-self.html) - [0240.search-a-2-d-matrix-ii](240.search-a-2-d-matrix-ii.html) - [0279.perfect-squares](279.perfect-squares.html) - [0309.best-time-to-buy-and-sell-stock-with-cooldown](309.best-time-to-buy-and-sell-stock-with-cooldown.html) - [0322.coin-change](322.coin-change.html) - [0328.odd-even-linked-list](328.odd-even-linked-list.html) - [0334.increasing-triplet-subsequence](334.increasing-triplet-subsequence.html) - [0337.house-robber-iii.md](337.house-robber-iii.html) - [0343.integer-break](343.integer-break.html)🆕 - [0365.water-and-jug-problem](365.water-and-jug-problem.html) - [0378.kth-smallest-element-in-a-sorted-matrix](378.kth-smallest-element-in-a-sorted-matrix.html) - [0380.insert-delete-getrandom-o1](380.insert-delete-getrandom-o1.html) - [0416.partition-equal-subset-sum](416.partition-equal-subset-sum.html)🖊 - [0445.add-two-numbers-ii](445.add-two-numbers-ii.html) - [0454.4-sum-ii](454.4-sum-ii.html) - [0474.ones-and-zeros](474.ones-and-zeros-en.md) - [0494.target-sum](494.target-sum.html) - [0516.longest-palindromic-subsequence](516.longest-palindromic-subsequence.html) - [0518.coin-change-2](518.coin-change-2.html) - [0547.friend-circles](547.friend-circles-en.md) - [0560.subarray-sum-equals-k](560.subarray-sum-equals-k.html) - [0609.find-duplicate-file-in-system](609.find-duplicate-file-in-system.html) - [0611.valid-triangle-number](611.valid-triangle-number.html) - [0718.maximum-length-of-repeated-subarray](718.maximum-length-of-repeated-subarray.html) - [0754.reach-a-number.md](754.reach-a-number.html) 🆕 - [0785.is-graph-bipartite](785.is-graph-bipartite.html) 🆕 - [0820.short-encoding-of-words](820.short-encoding-of-words.html) 🖊 - [0875.koko-eating-bananas](875.koko-eating-bananas.html) - [0877.stone-game](877.stone-game.html) - [0886.possible-bipartition](886.possible-bipartition.html) 🆕 - [0900.rle-iterator](900.rle-iterator.html) - [0912.sort-an-array](912.sort-an-array.html) - [0935.knight-dialer](935.knight-dialer.html) 🆕 - [1011.capacity-to-ship-packages-within-d-days](1011.capacity-to-ship-packages-within-d-days.html) - [1014.best-sightseeing-pair](1014.best-sightseeing-pair.html) 🆕 - [1015.smallest-integer-divisible-by-k](1015.smallest-integer-divisible-by-k.html) - [1019.next-greater-node-in-linked-list](1019.next-greater-node-in-linked-list.html) 🆕 - [1020.number-of-enclaves](1020.number-of-enclaves.html) - [1023.camelcase-matching](1023.camelcase-matching.html) - [1031.maximum-sum-of-two-non-overlapping-subarrays](1031.maximum-sum-of-two-non-overlapping-subarrays.html) - [1104.path-in-zigzag-labelled-binary-tree](1104.path-in-zigzag-labelled-binary-tree.html) - [1131.maximum-of-absolute-value-expression](1131.maximum-of-absolute-value-expression.html) - [1186.maximum-subarray-sum-with-one-deletion](1186.maximum-subarray-sum-with-one-deletion.html) 🆕 - [1218.longest-arithmetic-subsequence-of-given-difference](1218.longest-arithmetic-subsequence-of-given-difference.html) - [1227.airplane-seat-assignment-probability](1227.airplane-seat-assignment-probability.html) - [1261.find-elements-in-a-contaminated-binary-tree](1261.find-elements-in-a-contaminated-binary-tree.html) - [1262.greatest-sum-divisible-by-three](1262.greatest-sum-divisible-by-three.html) - [1297.maximum-number-of-occurrences-of-a-substring](1297.maximum-number-of-occurrences-of-a-substring.html) - [1310.xor-queries-of-a-subarray](1310.xor-queries-of-a-subarray.html) 🆕 - [1334.find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance](1334.find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.html) 🆕 - [1371.find-the-longest-substring-containing-vowels-in-even-counts](1371.find-the-longest-substring-containing-vowels-in-even-counts.html) 🆕