# LeetCode **Repository Path**: from_github/LeetCode ## Basic Information - **Project Name**: LeetCode - **Description**: https://leetcode-cn.com/problemset/all/ - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-15 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 快速索引 ## 一、数组 题号 |难度| 代码 --- |--- |--- [001](https://leetcode-cn.com/problems/two-sum/) |简单| [两数之和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode001.java) [004](https://leetcode-cn.com/problems/median-of-two-sorted-arrays/) |简单| [寻找两个有序数组的中位数](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode004.java) [011](https://leetcode-cn.com/problems/container-with-most-water/) |中等| [盛最多水的容器](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode011.java) [015](https://leetcode-cn.com/problems/3sum/) |中等| [三数之和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode015.java) [016](https://leetcode-cn.com/problems/3sum-closest/) |中等| [最接近的三数之和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode016.java) [018](https://leetcode-cn.com/problems/4sum/) |中等| [四数之和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode018.java) [026](https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/) |简单| [删除排序数组中的重复项](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode026.java) [027](https://leetcode-cn.com/problems/remove-element/) |简单| [移除元素](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode027.java) [031](https://leetcode-cn.com/problems/next-permutation/) |中等| [下一个排列](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode031.java) [033](https://leetcode-cn.com/problems/search-in-rotated-sorted-array/) |中等| [搜索旋转排序数组](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode033.java) [034](https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/) |中等| [在排序数组中查找元素的第一个和最后一个位置](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode034.java) [035](https://leetcode-cn.com/problems/search-insert-position/) |简单| [搜索插入位置](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode035.java) [041](https://leetcode-cn.com/problems/first-missing-positive/) |困难| [缺失的第一个正数](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode041.java) [042](https://leetcode-cn.com/problems/trapping-rain-water/) |困难| [接雨水](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode042.java) [048](https://leetcode-cn.com/problems/rotate-image/) |中等| [旋转图像](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode048.java) [053](https://leetcode-cn.com/problems/maximum-subarray/) |简单| [最大子序和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode053.java) [054](https://leetcode-cn.com/problems/spiral-matrix/) |困难| [螺旋矩阵](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode054.java) [056](https://leetcode-cn.com/problems/merge-intervals/) |中等| [合并区间](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode056.java) [059](https://leetcode-cn.com/problems/spiral-matrix-ii/) |中等| [螺旋矩阵 II](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode059.java) ## 二、链表 题号 |难度| 代码 --- |--- |--- [002](https://leetcode-cn.com/problems/add-two-numbers/) |中等| [两数相加](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode002.java) [019](https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/) |中等| [删除链表的倒数第N个节点](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode019.java) [021](https://leetcode-cn.com/problems/merge-two-sorted-lists/) |简单| [合并两个有序链表](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode021.java) [023](https://leetcode-cn.com/problems/merge-k-sorted-lists/) |困难| [合并K个排序链表](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode023.java) [024](https://leetcode-cn.com/problems/swap-nodes-in-pairs/) |中等| [两两交换链表中的节点](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode024.java) [061](https://leetcode-cn.com/problems/rotate-list/) |中等| [旋转链表](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode061.java) [141](https://leetcode-cn.com/problems/linked-list-cycle/) |简单| [环形链表](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode141.java) [206](https://leetcode-cn.com/problems/reverse-linked-list/) |简单| [反转链表](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode206.java) [876](https://leetcode-cn.com/problems/middle-of-the-linked-list/) |简单| [链表的中间结点](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode876.java) ## 三、字符串 题号 | 难度 | 代码 --- |--- |--- [003](https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/) |中等| [无重复字符的最长子串](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode003.java) [005](https://leetcode-cn.com/problems/longest-palindromic-substring/) |中等| [最长回文子串](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode005.java) [006](https://leetcode-cn.com/problems/zigzag-conversion/) |中等| [Z 字形变换](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode006.java) [008](https://leetcode-cn.com/problems/string-to-integer-atoi/) |中等| [字符串转换整数(atoi)](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode008.java) [014](https://leetcode-cn.com/problems/longest-common-prefix/) |简单| [最长公共前缀](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode014.java) [017](https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/) |中等| [电话号码的字母组合](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode017.java) [028](https://leetcode-cn.com/problems/implement-strstr/) |简单| [实现strStr()](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode028.java) [030](https://leetcode-cn.com/problems/substring-with-concatenation-of-all-words/) |困难| [串联所有单词的子串](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode030.java) [038](https://leetcode-cn.com/problems/count-and-say/) |中等| [报数](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode038.java) [058](https://leetcode-cn.com/problems/length-of-last-word/) |简单| [最后一个单词的长度](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode058.java) ## 四、哈希表 题号 | 难度 | 代码 --- |--- |--- [036](https://leetcode-cn.com/problems/valid-sudoku/) |中等| [有效的数独](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode036.java) [049](https://leetcode-cn.com/problems/group-anagrams/) |中等| [字母异位词分组](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode049.java) ## 五、栈 题号 | 难度 | 代码 --- |--- |--- [020](https://leetcode-cn.com/problems/valid-parentheses/) |简单| [有效的括号](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode020.java) [032](https://leetcode-cn.com/problems/longest-valid-parentheses/) |困难| [最长有效括号](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode032.java) ## 六、动态规划 题号 | 难度 | 代码 --- |--- |--- [010](https://leetcode-cn.com/problems/regular-expression-matching/) |困难| [正则表达式匹配](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode010.java) [062](https://leetcode-cn.com/problems/unique-paths/) |中等| [不同路径](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode062.java) [072](https://leetcode-cn.com/problems/edit-distance/) |困难| [编辑距离](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode072.java) [198](https://leetcode-cn.com/problems/house-robber/) |简单| [打家劫舍](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode198.java) [322](https://leetcode-cn.com/problems/coin-change/) |中等| [零钱兑换](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode322.java) ## 七、贪心算法 题号 | 难度 | 代码 --- |--- |--- [045](https://leetcode-cn.com/problems/jump-game-ii/) |困难| [跳跃游戏 II](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode045.java) [055](https://leetcode-cn.com/problems/jump-game/) |中等| [跳跃游戏](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode055.java) [870](https://leetcode-cn.com/problems/advantage-shuffle/) |中等| [优势洗牌](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode870.java) ## 八、数学 题号 | 难度 | 代码 --- |--- |--- [007](https://leetcode-cn.com/problems/reverse-integer/) |简单| [整数反转](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode007.java) [009](https://leetcode-cn.com/problems/palindrome-number/) |简单| [回文数](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode009.java) [012](https://leetcode-cn.com/problems/integer-to-roman/) |中等| [整数转罗马数字](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode012.java) [013](https://leetcode-cn.com/problems/roman-to-integer/) |简单| [罗马数字转整数](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode013.java) [029](https://leetcode-cn.com/problems/divide-two-integers/) |中等| [两数相除](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode029.java) [043](https://leetcode-cn.com/problems/multiply-strings/) |中等| [字符串相乘](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode043.java) [050](https://leetcode-cn.com/problems/powx-n/) |中等| [Pow(x, n)](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode050.java) ## 九、树 ### 9.1、二叉树 题号 | 难度 | 代码 --- |--- |--- [094](https://leetcode-cn.com/problems/binary-tree-inorder-traversal/) |中等| [二叉树的中序遍历](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode094.java) [112](https://leetcode-cn.com/problems/path-sum/) | 简单 | [路径总和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode112.java) [124](https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/) |困难| [二叉树中的最大路径和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode124.java) [297](https://leetcode-cn.com/problems/serialize-and-deserialize-binary-tree/) |困难| [二叉树的序列化与反序列化](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode297.java) ### 9.2、前缀树(字典树),相关文章:[Implement Trie (Prefix Tree)](https://leetcode.com/articles/implement-trie-prefix-tree/) 题号 | 难度 | 代码 --- |--- |--- [208](https://leetcode-cn.com/problems/implement-trie-prefix-tree/) |中等| [实现 Trie (前缀树)](https://github.com/TimePickerWang/LeetCode/blob/master/code/Trie.java) ## 十、回溯算法 题号 | 难度 | 代码 --- |--- |--- [022](https://leetcode-cn.com/problems/generate-parentheses/) |中等| [括号生成](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode022.java) [039](https://leetcode-cn.com/problems/combination-sum/) |中等| [组合总和](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode039.java) [040](https://leetcode-cn.com/problems/combination-sum-ii/) |中等| [组合总和 II](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode040.java) [046](https://leetcode-cn.com/problems/permutations/) |中等| [全排列](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode046.java) [047](https://leetcode-cn.com/problems/permutations-ii/) |中等| [全排列 II](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode047.java) [079](https://leetcode-cn.com/problems/word-search/) |中等| [单词搜索](https://github.com/TimePickerWang/LeetCode/blob/master/code/LeetCode079.java) ## 十一、设计 题号 | 难度 | 代码 --- |--- |--- [146](https://leetcode-cn.com/problems/lru-cache/) |困难| [LRU缓存机制](https://github.com/TimePickerWang/LeetCode/blob/master/code/LRUCache.java) [295](https://leetcode-cn.com/problems/find-median-from-data-stream/) |困难| [数据流的中位数](https://github.com/TimePickerWang/LeetCode/blob/master/code/MedianFinder.java)