# 《剑指offer》第2版对应LeetCode题目 《剑指offer》第2版中的面试题对应的LeetCode题目。 * 编号:题目在书中的编号; * 题目:[《牛客网剑指offer专题》](https://www.nowcoder.com/ta/coding-interviews?page=1)对应题目链接,这是第1版的,所以第2版有的题目这里没有; * LeetCode: 对应LeetCode题目的题解链接; | 编号 | 题目 | LeetCode | 备注 | | ---- | --- | ----- | ----- | | 3 | [数组中重复的数字](https://www.nowcoder.com/practice/623a5ac0ea5b4e5f95552655361ae0a8?tpId=13&tqId=11203&tPage=3&rp=3&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [287. Find the Duplicate Number](solutions/287.%20Find%20the%20Duplicate%20Number.md)| 注意细微差别 | | 4 | [二维数组中的查找](https://www.nowcoder.com/practice/abc3fe2ce8e146608e868a70efebf62e?tpId=13&tqId=11154&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [240. Search a 2D Matrix II](solutions/240.%20Search%20a%202D%20Matrix%20II.md)| | 7 | [重建二叉树](https://www.nowcoder.com/practice/8a19cbe657394eeaac2f6ea9b0f6fcf6?tpId=13&tqId=11157&tPage=1&rp=3&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [105. Construct Binary Tree from Preorder and Inorder Traversal](solutions/105.%20Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal.md)| | 9 | [用两个栈实现队列](https://www.nowcoder.com/practice/54275ddae22f475981afa2244dd448c6?tpId=13&tqId=11158&tPage=1&rp=3&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [232. Implement Queue using Stacks](solutions/232.%20Implement%20Queue%20using%20Stacks.md)| | 10 | [斐波那契数列](https://www.nowcoder.com/practice/c6c7742f5ba7442aada113136ddea0c3?tpId=13&tqId=11160&tPage=1&rp=3&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [509. Fibonacci Number](solutions/509.%20Fibonacci%20Number.md), [70. Climbing Stairs](solutions/70.%20Climbing%20Stairs.md)| | 11 | [旋转数组中的最小数字](https://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba?tpId=13&tqId=11159&tPage=1&rp=3&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [153. Find Minimum in Rotated Sorted Array](solutions/153.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array.md)| | 12 | [矩阵中的路径](https://www.nowcoder.com/practice/c61c6999eecb4b8f88a98f66b273a3cc?tpId=13&tqId=11218&tPage=4&rp=4&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [79. Word Search](solutions/79.%20Word%20Search.md)| | 15 | [二进制中1的个数](https://www.nowcoder.com/practice/8ee967e43c2c4ec193b040ea7fbb10b8?tpId=13&tqId=11164&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [191. Number of 1 Bits](solutions/191.%20Number%20of%201%20Bits.md)| | 16 | [数值的整数次方](https://www.nowcoder.com/practice/1a834e5e3e1a4b7ba251417554e07c00?tpId=13&tqId=11165&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [50. Pow(x, n)](solutions/50.%20Pow(x%2C%20n).md)| | 18 | 删除链表中的节点 一 | [237. Delete Node in a Linked List](solutions/237.%20Delete%20Node%20in%20a%20Linked%20List.md)| 略有不同 | | 18 | [删除链表中的节点 二](https://www.nowcoder.com/practice/fc533c45b73a41b0b44ccba763f866ef?tpId=13&tqId=11209&tPage=3&rp=3&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [82. Remove Duplicates from Sorted List II](solutions/82.%20Remove%20Duplicates%20from%20Sorted%20List%20II.md)| | 19 | [正则表达式匹配](https://www.nowcoder.com/practice/45327ae22b7b413ea21df13ee7d6429c?tpId=13&tqId=11205&tPage=3&rp=3&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [10. Regular Expression Matching](solutions/10.%20Regular%20Expression%20Matching.md)| | 20 | [表示数值的字符串](https://www.nowcoder.com/practice/6f8c901d091949a5837e24bb82a731f2?tpId=13&tqId=11206&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [65. Valid Number](solutions/65.%20Valid%20Number.md)| | 21 | [调整数组顺序使奇数位于偶数之前](https://www.nowcoder.com/practice/6f8c901d091949a5837e24bb82a731f2?tpId=13&tqId=11206&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [905. Sort Array By Parity](solutions/905.%20Sort%20Array%20By%20Parity.md)| 要求刚好相反 | | 22 | [链表中倒数第k个节点](https://www.nowcoder.com/practice/529d3ae5a407492994ad2a246518148a?tpId=13&tqId=11167&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [19. Remove Nth Node From End of List](solutions/19.%20Remove%20Nth%20Node%20From%20End%20of%20List.md)| 查找然后删除 | | 23 | [链表中环的入口节点](https://www.nowcoder.com/practice/253d2c59ec3e4bc68da16833f79a38e4?tpId=13&tqId=11208&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [142. Linked List Cycle II](solutions/142.%20Linked%20List%20Cycle%20II.md)| | | 24 | [反转链表](https://www.nowcoder.com/practice/75e878df47f24fdc9dc3e400ec6058ca?tpId=13&tqId=11168&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [206. Reverse Linked List](solutions/206.%20Reverse%20Linked%20List.md)| | | 25 | [合并两个排序的链表](https://www.nowcoder.com/practice/d8b6b4358f774294a89de2a6ac4d9337?tpId=13&tqId=11169&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [21. Merge Two Sorted Lists](solutions/21.%20Merge%20Two%20Sorted%20Lists.md)| | | 26 | [树的子结构](https://www.nowcoder.com/practice/6e196c44c7004d15b1610b9afca8bd88?tpId=13&tqId=11170&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [572. Subtree of Another Tree](solutions/572.%20Subtree%20of%20Another%20Tree.md)| 略有不同 | | 27 | [二叉树的镜像](https://www.nowcoder.com/practice/564f4c26aa584921bc75623e48ca3011?tpId=13&tqId=11171&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [226. Invert Binary Tree](solutions/226.%20Invert%20Binary%20Tree.md)| | 28 | [对称的二叉树](https://www.nowcoder.com/practice/ff05d44dfdb04e1d83bdbdab320efbcb?tpId=13&tqId=11211&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking) | [101. Symmetric Tree](solutions/101.%20Symmetric%20Tree.md)| | 29 | [顺时针打印矩阵](https://www.nowcoder.com/practice/9b4c81a02cd34f76be2659fa0d54342a?tpId=13&tqId=11172&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [54. Spiral Matrix](solutions/54.%20Spiral%20Matrix.md)| | 30 | [包含min函数的栈](https://www.nowcoder.com/practice/4c776177d2c04c2494f2555c9fcc1e49?tpId=13&tqId=11173&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-interviews%2Fquestion-ranking) | [155. Min Stack](solutions/155.%20Min%20Stack.md)|