# Top Interview 150

## Top Interview 150

- [Welcome!](https://leetcodebook-1.gitbook.io/top-interview-150/readme.md): 本书内容包含力扣面试150题的解答及相关解题思路
- [数组-字符串](https://leetcodebook-1.gitbook.io/top-interview-150/array-string.md)
- [合并两个有序数组](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/merge-sorted-array.md)
- [移除元素](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/remove-element.md)
- [删除有序数组中的重复项](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/remove-duplicates-from-sorted-array.md)
- [删除有序数组中的重复项II](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/remove-duplicates-from-sorted-array-ii.md)
- [买卖股票的最佳时机](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/best-time-to-buy-and-sell-stock.md)
- [买卖股票的最佳时机II](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/best-time-to-buy-and-sell-stock-ii.md)
- [多数元素](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/majority-element.md)
- [罗马数字转整数](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/roman-to-integer.md)
- [轮转数组](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/rotate-array.md)
- [跳跃游戏](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/jump-game.md)
- [跳跃游戏II](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/jump-game-ii.md)
- [找出字符串中第一个匹配项的下标](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/find-the-index-of-the-first-occurrence-in-a-string.md)
- [柠檬水找零](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/lemonade-change.md)
- [最长回文子串](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/longest-palindromic-substring.md)
- [H指数](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/h-index.md)
- [O(1)时间插入、删除和获取随机元素](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/insert-delete-getrandom-o1.md)
- [除自身以外数组的乘积](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/product-of-array-except-self.md)
- [加油站](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/gas-station.md)
- [分发糖果](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/candy.md)
- [最后一个单词的长度](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/length-of-last-word.md)
- [整数转罗马数字](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/integer-to-roman.md)
- [最长公共前缀](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/longest-common-prefix.md)
- [反转字符串重的单词](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/reverse-words-in-a-string.md)
- [N字形变换](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/zigzag-conversion.md)
- [文本左右对齐](https://leetcodebook-1.gitbook.io/top-interview-150/array-string/text-justification.md)
- [双指针](https://leetcodebook-1.gitbook.io/top-interview-150/double-point.md)
- [验证回文串](https://leetcodebook-1.gitbook.io/top-interview-150/double-point/valid-palindrome.md)
- [判断子序列](https://leetcodebook-1.gitbook.io/top-interview-150/double-point/is-subsequence.md)
- [两数之和 II - 输入有序数组](https://leetcodebook-1.gitbook.io/top-interview-150/double-point/two-sum-ii-input-array-is-sorted.md)
- [三数之和](https://leetcodebook-1.gitbook.io/top-interview-150/double-point/three-sum.md)
- [盛最多水的容器](https://leetcodebook-1.gitbook.io/top-interview-150/double-point/container-with-most-water.md)
- [滑动窗口](https://leetcodebook-1.gitbook.io/top-interview-150/sliding-window.md)
- [长度最小的子数组](https://leetcodebook-1.gitbook.io/top-interview-150/sliding-window/minimum-size-subarray-sum.md)
- [无重复字符的最长子串](https://leetcodebook-1.gitbook.io/top-interview-150/sliding-window/longest-substring-without-repeating-characters.md)
- [串联所有单词的子串](https://leetcodebook-1.gitbook.io/top-interview-150/sliding-window/substring-with-concatenation-of-all-words.md)
- [最小覆盖子串](https://leetcodebook-1.gitbook.io/top-interview-150/sliding-window/minimum-window-substring.md)
- [矩阵](https://leetcodebook-1.gitbook.io/top-interview-150/matrix.md)
- [有效的数独](https://leetcodebook-1.gitbook.io/top-interview-150/matrix/valid-sudoku.md)
- [螺旋矩阵](https://leetcodebook-1.gitbook.io/top-interview-150/matrix/spiral-matrix.md)
- [旋转矩阵](https://leetcodebook-1.gitbook.io/top-interview-150/matrix/rotate-image.md)
- [矩阵置零](https://leetcodebook-1.gitbook.io/top-interview-150/matrix/set-matrix-zeroes.md)
- [生命游戏](https://leetcodebook-1.gitbook.io/top-interview-150/matrix/game-of-life.md)
- [哈希表](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table.md)
- [赎金信](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/ransom-note.md)
- [两数之和](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/two-sum.md)
- [快乐数](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/is-happy.md)
- [同构字符串](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/isomorphic-strings.md)
- [单词规律](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/word-pattern.md)
- [有效的字母异位词](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/valid-anagram.md)
- [字母异位词分组](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/group-anagrams.md)
- [存在重复元素 II](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/contains-duplicate-ii.md)
- [最长连续序列](https://leetcodebook-1.gitbook.io/top-interview-150/hash-table/longest-consecutive-sequence.md)
- [区间](https://leetcodebook-1.gitbook.io/top-interview-150/section.md)
- [汇总区间](https://leetcodebook-1.gitbook.io/top-interview-150/section/summary-ranges.md)
- [合并区间](https://leetcodebook-1.gitbook.io/top-interview-150/section/merge-intervals.md)
- [插入区间](https://leetcodebook-1.gitbook.io/top-interview-150/section/insert-interval.md)
- [用最少数量的箭箭引爆气球](https://leetcodebook-1.gitbook.io/top-interview-150/section/minimum-number-of-arrows-to-burst-balloons.md)
- [栈](https://leetcodebook-1.gitbook.io/top-interview-150/stack.md)
- [有效的括号](https://leetcodebook-1.gitbook.io/top-interview-150/stack/is-valid.md)
- [简化路径](https://leetcodebook-1.gitbook.io/top-interview-150/stack/simplify-path.md)
- [最小栈](https://leetcodebook-1.gitbook.io/top-interview-150/stack/min-stack.md)
- [基本计算器](https://leetcodebook-1.gitbook.io/top-interview-150/stack/basic-calculator.md)
- [逆波兰表达式求值](https://leetcodebook-1.gitbook.io/top-interview-150/stack/evaluate-reverse-polish-notation.md)
- [链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list.md)
- [环形链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/linked-list-cycle.md)
- [两数相加](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/liang-shu-xiang-jia.md)
- [合并两个有序链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/merge-two-sorted-lists.md)
- [复制带随机指针的链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/copy-list-with-random-pointer.md)
- [反转链表 II](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/reverse-linked-list-ii.md)
- [删除链表的倒数第 N 个结点](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/remove-nth-node-from-end-of-list.md)
- [删除排序链表中的重复元素](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/remove-duplicates-from-sorted-list.md)
- [旋转链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/rotate-list.md)
- [分隔链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/partition-list.md)
- [LRU 缓存](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/lru-cache.md)
- [K个一组翻转链表](https://leetcodebook-1.gitbook.io/top-interview-150/linked-list/reverse-nodes-in-k-group.md)
- [树](https://leetcodebook-1.gitbook.io/top-interview-150/tree.md)
- [二叉树的最大深度](https://leetcodebook-1.gitbook.io/top-interview-150/tree/maximum-depth-of-binary-tree.md)
- [相同的树](https://leetcodebook-1.gitbook.io/top-interview-150/tree/same-tree.md)
- [翻转二叉树](https://leetcodebook-1.gitbook.io/top-interview-150/tree/invert-binary-tree.md)
- [对称二叉树](https://leetcodebook-1.gitbook.io/top-interview-150/tree/symmetric-tree.md)
- [填充每个节点的下一个右侧节点指针](https://leetcodebook-1.gitbook.io/top-interview-150/tree/populating-next-right-pointers-in-each-node.md)
- [二叉树展开为链表](https://leetcodebook-1.gitbook.io/top-interview-150/tree/flatten-binary-tree-to-linked-list.md)
- [从前序和中序遍历序列构造二叉树](https://leetcodebook-1.gitbook.io/top-interview-150/tree/construct-binary-tree-from-preorder-and-inorder-traversal.md)
- [求根节点到叶节点数字之和](https://leetcodebook-1.gitbook.io/top-interview-150/tree/sum-root-to-leaf-numbers.md)
- [二叉树中最大路径和](https://leetcodebook-1.gitbook.io/top-interview-150/tree/binary-tree-maximum-path-sum.md)
- [二叉搜索树迭代器](https://leetcodebook-1.gitbook.io/top-interview-150/tree/binary-search-tree-iterator.md)
- [完全二叉树的节点个数](https://leetcodebook-1.gitbook.io/top-interview-150/tree/count-complete-tree-nodes.md)
- [二叉树的最近公共祖先](https://leetcodebook-1.gitbook.io/top-interview-150/tree/lowest-common-ancestor-of-a-binary-tree.md)
- [二叉树的右视图](https://leetcodebook-1.gitbook.io/top-interview-150/tree/binary-tree-right-side-view.md)
- [二叉树的层平均值](https://leetcodebook-1.gitbook.io/top-interview-150/tree/average-of-levels-in-binary-tree.md)
- [二叉树的层序遍历](https://leetcodebook-1.gitbook.io/top-interview-150/tree/binary-tree-level-order-traversal.md)
- [二叉树的锯齿形层序遍历](https://leetcodebook-1.gitbook.io/top-interview-150/tree/binary-tree-zigzag-level-order-traversal.md)
- [二叉搜索树的最小绝对差](https://leetcodebook-1.gitbook.io/top-interview-150/tree/minimum-absolute-difference-in-bst.md)
- [二叉搜索树中第K小的元素](https://leetcodebook-1.gitbook.io/top-interview-150/tree/kth-smallest-element-in-a-bst.md)
- [验证二叉搜索树](https://leetcodebook-1.gitbook.io/top-interview-150/tree/validate-binary-search-tree.md)
- [图](https://leetcodebook-1.gitbook.io/top-interview-150/graph.md)
- [岛屿数量](https://leetcodebook-1.gitbook.io/top-interview-150/graph/number-of-islands.md)
- [被围绕的区域](https://leetcodebook-1.gitbook.io/top-interview-150/graph/surrounded-regions.md)
- [克隆图](https://leetcodebook-1.gitbook.io/top-interview-150/graph/clone-graph.md)
- [除法求值](https://leetcodebook-1.gitbook.io/top-interview-150/graph/evaluate-division.md)
- [课程表](https://leetcodebook-1.gitbook.io/top-interview-150/graph/course-schedule.md)
- [课程表 II](https://leetcodebook-1.gitbook.io/top-interview-150/graph/course-schedule-ii.md)
- [广度优先搜索](https://leetcodebook-1.gitbook.io/top-interview-150/bfs.md)
- [蛇梯棋](https://leetcodebook-1.gitbook.io/top-interview-150/bfs/snakes-and-ladders.md)
- [最小基因变化](https://leetcodebook-1.gitbook.io/top-interview-150/bfs/minimum-genetic-mutation.md)
- [单词接龙](https://leetcodebook-1.gitbook.io/top-interview-150/bfs/word-ladder.md)
- [深度优先搜索](https://leetcodebook-1.gitbook.io/top-interview-150/dfs.md)
- [字典树](https://leetcodebook-1.gitbook.io/top-interview-150/trie.md)
- [实现 Trie (前缀树)](https://leetcodebook-1.gitbook.io/top-interview-150/trie/implement-trie-prefix-tree.md)
- [添加与搜索单词 - 数据结构设计](https://leetcodebook-1.gitbook.io/top-interview-150/trie/add-and-search-word-data-structure-design.md)
- [单词搜索 II](https://leetcodebook-1.gitbook.io/top-interview-150/trie/word-search-ii.md)
- [回溯](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking.md)
- [电话号码的字母组合](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/letter-combinations-of-a-phone-number.md)
- [组合](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/combinations.md)
- [全排列](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/permutations.md)
- [组合总和](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/combination-sum.md)
- [括号生成](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/generate-parentheses.md)
- [n皇后问题II](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/n-queens-ii.md)
- [单词搜索](https://leetcodebook-1.gitbook.io/top-interview-150/backtracking/word-search.md)
- [分治](https://leetcodebook-1.gitbook.io/top-interview-150/divide-and-conquer.md)
- [将有序数组转换为二叉搜索树](https://leetcodebook-1.gitbook.io/top-interview-150/divide-and-conquer/convert-sorted-array-to-binary-search-tree.md)
- [排序链表](https://leetcodebook-1.gitbook.io/top-interview-150/divide-and-conquer/sort-list.md)
- [Kadane 算法](https://leetcodebook-1.gitbook.io/top-interview-150/kadane.md)
- [环形子数组的最大和](https://leetcodebook-1.gitbook.io/top-interview-150/kadane/maximum-sum-circular-subarray.md)
- [最大子数组和](https://leetcodebook-1.gitbook.io/top-interview-150/kadane/maximum-subarray.md)
- [二分查找](https://leetcodebook-1.gitbook.io/top-interview-150/binary-search.md)
- [搜索插入位置](https://leetcodebook-1.gitbook.io/top-interview-150/binary-search/search-insert-position.md)
- [寻找峰值](https://leetcodebook-1.gitbook.io/top-interview-150/binary-search/find-peak-element.md)
- [搜索二维矩阵](https://leetcodebook-1.gitbook.io/top-interview-150/binary-search/search-a-2d-matrix.md)
- [堆](https://leetcodebook-1.gitbook.io/top-interview-150/heap.md)
- [位运算](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise.md)
- [二进制求和](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise/add-binary.md)
- [颠倒二进制位](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise/reverse-bits.md)
- [位1的个数](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise/number-of-1-bits.md)
- [只出现一次的数字](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise/single-number.md)
- [只出现一次的数字 II](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise/single-number-ii.md)
- [数字范围按位与](https://leetcodebook-1.gitbook.io/top-interview-150/bitwise/bitwise-and-of-numbers-range.md)
- [数学](https://leetcodebook-1.gitbook.io/top-interview-150/math.md)
- [回文数](https://leetcodebook-1.gitbook.io/top-interview-150/math/palindrome-number.md)
- [阶乘后的零](https://leetcodebook-1.gitbook.io/top-interview-150/math/factorial-trailing-zeroes.md)
- [加一](https://leetcodebook-1.gitbook.io/top-interview-150/math/plus-one.md)
- [x 的平方根](https://leetcodebook-1.gitbook.io/top-interview-150/math/sqrtx.md)
- [Pow(x, n)](https://leetcodebook-1.gitbook.io/top-interview-150/math/powx-n.md)
- [直线上最多的点数](https://leetcodebook-1.gitbook.io/top-interview-150/math/max-points-on-a-line.md)
- [动态规划](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic.md)
- [爬楼梯](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/climbing-stairs.md)
- [打家劫舍](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/house-robber.md)
- [单词拆分](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/word-break.md)
- [最长递增子序列](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/longest-increasing-subsequence.md)
- [零钱兑换](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/coin-change.md)
- [三角形最小路径和](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/triangle.md)
- [最小路径和](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/minimum-path-sum.md)
- [不同路径 II](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/unique-paths-ii.md)
- [最长回文子串](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/longest-palindromic-substring.md)
- [交错字符串](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/interleaving-string.md)
- [编辑距离](https://leetcodebook-1.gitbook.io/top-interview-150/dynamic/edit-distance.md)
