因为题解较多,因此按照题号排序,每 100 道题汇总到一起。 你可以在侧边栏点击题号所处的范围,也可以通过 Ctrl + F 搜索题号/标题。 LeetCode 之 001-099 刷题笔记 1. Two Sum 两数之和 2. Add Two Numbers 两数相加 3. Longest Substring Without Repeating Characters 无重复字符的最长子串 4. Median of Two Sorted Arrays 寻找两个正序数组的中位数 5. Longest Palindromic Substring 最长回文子串 6. Zigzag Conversion Z 字形变换 7. Reverse Integer 整数反转 8. String to Integer (atoi) 字符串转换整数 (atoi) 9. Palindrome Number 回文数 11. Container With Most Water 盛最多水的容器 12. Integer to Roman 整数转罗马数字 13. Roman to Integer 罗马数字转整数 14. Longest Common Prefix 最长公共前缀 15. 3Sum 三数之和 16. 3Sum Closest 最接近的三数之和 17. Letter Combinations of a Phone Number 电话号码的字母组合 18. 4Sum 四数之和 19. Remove Nth Node From End of List 删除链表的倒数第 N 个结点 20. Valid Parentheses 有效的括号 21. Merge Two Sorted Lists 合并两个有序链表 22. Generate Parentheses 括号生成 23. Merge k Sorted Lists 合并K个升序链表 26. Remove Duplicates from Sorted Array 删除有序数组中的重复项 27. Remove Element 移除元素 28. Implement strStr() 实现 strStr() 31. Next Permutation 下一个排列 33. Search in Rotated Sorted Array 搜索旋转排序数组 34. Find First and Last Position of Element in Sorted Array 在排序数组中查找元素的第一个和最后一个位置 35. Search Insert Position 搜索插入位置 36. Valid Sudoku 有效的数独 38. Count and Say 外观数列 39. Combination Sum 组合总和 40. Combination Sum II 组合总和 II 42. Trapping Rain Water 接雨水 43. Multiply Strings 字符串相乘 45. Jump Game II 跳跃游戏 II 46. Permutations 全排列 47. Permutations II 全排列 II 48. Rotate Image 旋转图像 49. Group Anagrams 字母异位词分组 50. Pow(x, n) Pow(x, n) 51. N-Queens N 皇后 52. N-Queens II N皇后 II 53. Maximum Subarray 最大子数组和 54. Spiral Matrix 螺旋矩阵 55. Jump Game 跳跃游戏 56. Merge Intervals 合并区间 58. Length of Last Word 最后一个单词的长度 59. Spiral Matrix II 螺旋矩阵 II 60. Permutation Sequence 排列序列 61. 61. Rotate List 解题报告(Python) 62. Unique Paths 不同路径 63. Unique Paths II 不同路径 II 64. Minimum Path Sum 最小路径和 66. Plus One 加一 67. Add Binary 二进制求和 69. Sqrt(x) x 的平方根 70. Climbing Stairs 爬楼梯 71. Simplify Path 简化路径 72. Edit Distance 编辑距离 73. Set Matrix Zeroes 矩阵置零 74. Search a 2D Matrix 搜索二维矩阵 75. Sort Colors 颜色分类 76. Minimum Window Substring 最小覆盖子串 77. Combinations 组合 78. Subsets 子集 79. Word Search 单词搜索 80. Remove Duplicates from Sorted Array II 删除有序数组中的重复项 II 81. Search in Rotated Sorted Array II 搜索旋转排序数组 II 82. Remove Duplicates from Sorted List II 删除排序链表中的重复元素 II 83. Remove Duplicates from Sorted List 删除排序链表中的重复元素 84. Largest Rectangle in Histogram 柱状图中最大的矩形 85. Maximal Rectangle 最大矩形 86. Partition List 分隔链表 87. Scramble String 扰乱字符串 88. Merge Sorted Array 合并两个有序数组 89. Gray Code 格雷编码 90. Subsets II 子集 II 91. Decode Ways 解码方法 92. Reverse Linked List II 反转链表 II 93. Restore IP Addresses 复原 IP 地址 94. Binary Tree Inorder Traversal 二叉树的中序遍历 95. Unique Binary Search Trees II 不同的二叉搜索树 I 96. Unique Binary Search Trees 不同的二叉搜索树 98. Validate Binary Search Tree 验证二叉搜索树 99. Recover Binary Search Tree 恢复二叉搜索树