leetcode
leetcode copied to clipboard
java/python for leetcode: 1) array,2) list,3) string,4) hashtable,5) math,6) tree
leetcode算法题目
题目官网: https://leetcode.com/problemset/all/
题目由java和python实现, 按照类型分为:array,list,string,hashtable,math,tree:
1.array
2.list
| 题号 | 题目内容 | 题目难度 |
|---|---|---|
| 114 | Flatten Binary Tree to Linked List | Middle |
| 23 | Merge k Sorted Lists | Middle |
| *142 | Linked List Cycle II | Middle |
| 160 | Intersection of Two Linked Lists | Easy |
| 234 | Palindrome Linked List | Easy |
| 155 | Min Stack | Easy |
| 148 | Sort List | Easy |
| 21 | Merge Two Sorted Lists | Easy |
| 206 | Reverse Linked List | Easy |
| 141 | Linked List Cycle | Easy |
| 19 | Remove Nth Node From End of List | Easy |
3.string
| 题号 | 题目内容 | 题目难度 |
|---|---|---|
| 32 | Longest Valid Parentheses | Hard |
| *22 | Generate Parentheses | Middle |
| 49 | Group Anagrams | Middle |
| 139 | Word Break | Middle |
| *5 | Longest Palindromic Substring | Easy |
| 394 | Decode String | Middle |
| 3 | Longest Substring Without Repeating Characters | Easy |
| 917 | Reverse Only Letters | Easy |
| 520 | Detect Capital | Easy |
| 541 | Reverse String II | Easy |
| 66 | Plus one | Easy |
| 647 | Palindromic Substrings | Easy |
| 438 | Find All Anagrams in a String | Easy |
| 67 | Add Binary | Easy |
4.hashtable
| 题号 | 题目内容 | 题目难度 |
|---|---|---|
| 1 | Two Sum | Easy |
| 3 | Pairs Of Parentheses | Middle |
| 48 | Rotate Image | Middle |
| 461 | Hamming Distance | Easy |
| 771 | Jewels and Stones | Easy |
| 167 | Two Sum II - Input array is sorted | Easy |
5.math
| 题号 | 题目内容 | 题目难度 |
|---|---|---|
| 258 | Add Digits | Easy |
| 1154 | Day Of Year | Easy |
6.tree
| 题号 | 题目内容 | 题目难度 |
|---|---|---|
| 94 | Binary Tree Inorder Traversal | Easy |
| 144 | Binary Tree PreOrder Traversal | Middle |
| 145 | Binary Tree Post Order Traversal | Middle |
| 236 | Lowest Common Ancestor of a Binary Tree | Middle |
| *337 | House Robber III | Middle |
| 102 | Binary Tree Level Order Traversal | Middle |
| 94 | Binary Tree Inorder Traversal | Middle |
| 538 | Convert BST to Greater Tree | Easy |
| 572 | Subtree of Another Tree | Easy |
| 543 | Diameter of Binary Tree | Easy |
| 101 | Symmetric Tree | Easy |
| 226 | Invert Binary Tree | Easy |
| 104 | Maximum Depth of Binary Tree | Easy |
| 617 | Merge Two Binary Trees | Easy |
| *606 | Construct String from Binary Tree | Easy |