Kindem 的个人 LeetCode 题解仓库,欢迎交流学习。
下面的目录中 $number 题号代表经典 LeetCode 题目,$number.$number 题号表示 LeetCode 面试题。
| 统计 | 值 |
|---|---|
| AC 的题目总数 | 311 |
C++ :
| 编号 | 题目名 | 操作 |
|---|---|---|
| 1 | Two Sum | 传送门 |
| 4 | Median of Two Sorted Arrays | 传送门 |
| 5 | Longest Palindromic Substring | 传送门 |
| 8 | String to Integer | 传送门 |
| 11 | Container with Most Water | 传送门 |
| 14 | Longest Common Prefix | 传送门 |
| 15 | Three Sum | 传送门 |
| 16 | Three Sum Closest | 传送门 |
| 20 | Valid Parentheses | 传送门 |
| 26 | Remove Duplicates from Sorted Array | 传送门 |
| 48 | Rotate Image | 传送门 |
| 53 | Maximum Subarray | 传送门 |
| 55 | Jump Game | 传送门 |
| 56 | Merge Intervals | 传送门 |
| 64 | Minimum Path Sum | 传送门 |
| 73 | Set Matrix Zeros | 传送门 |
| 75 | Set Matrix Zeros | 传送门 |
| 121 | Best Time to Buy and Sell Stock | 传送门 |
| 125 | Valid Palindrome | 传送门 |
| 135 | Candy | 传送门 |
| 146 | IRU Cache | 传送门 |
| 435 | Non-overlapping Intervals | 传送门 |
| 746 | Min Cost Climbing Stairs | 传送门 |
| 831 | Masking Personal Information | 传送门 |
Java :
| 编号 | 题目名 | 操作 |
|---|---|---|
| 1.1 | Is Unique LCCI | 传送门 |
| 1.2 | Check Permutation LCCI | 传送门 |
| 1.3 | String to URL LCCI | 传送门 |
| 1.4 | Palindrome Permutation LCCI | 传送门 |
| 1.5 | One Away LCCI | 传送门 |
| 1.6 | Compress String LCCI | 传送门 |
| 1 | Two Sum | 传送门 |
| 2 | Add Two Numbers | 传送门 |
| 3 | Longest Substring without Repeating Characters | 传送门 |
| 4.3 | List of Depth LCCI | 传送门 |
| 4 | Median of Two Sorted Arrays | 传送门 |
| 5 | Longest Palindromic Substring | 传送门 |
| 6 | Zigzag Conversion | 传送门 |
| 7 | Reverse Integer | 传送门 |
| 8 | String to Integer | 传送门 |
| 9 | Palindrome Number | 传送门 |
| 10.1 | Sorted Merge LCCI | 传送门 |
| 10 | Regular Expression Matching | 传送门 |
| 14 | Longest Common Prefix | 传送门 |
| 15 | 3Sum | 传送门 |
| 17.16 | The Masseuse LCCI | 传送门 |
| 18 | 4Sum | 传送门 |
| 21 | Merge Two Sorted Lists | 传送门 |
| 22 | Generate Parentheses | 传送门 |
| 24 | Swap Nodes in Pairs | 传送门 |
| 25 | Reverse Nodes in k-Group | 传送门 |
| 29 | Divide Two Integers | 传送门 |
| 30 | Substring with Concatenation of All Words | 传送门 |
| 31 | Next Permutation | 传送门 |
| 32 | Longest Valid Parentheses | 传送门 |
| 34 | Find First and Last Position of Element in Sorted Array | 传送门 |
| 36 | Valid Sudoku | 传送门 |
| 37 | Sudoku Solver | 传送门 |
| 40 | Combination Sum II | 传送门 |
| 41 | First Missing Positive | 传送门 |
| 42 | Trapping Rain Water | 传送门 |
| 44 | Wildcard Matching | 传送门 |
| 45 | Jump Game II | 传送门 |
| 49 | Group Anagrams | 传送门 |
| 50 | Pow(x, n) | 传送门 |
| 51 | N-Queens | 传送门 |
| 52 | N-Queens II | 传送门 |
| 57 | Insert Interval | 传送门 |
| 63 | Unique Paths II | 传送门 |
| 65 | Valid Number | 传送门 |
| 68 | Text Justification | 传送门 |
| 70 | Climbing Stairs | 传送门 |
| 71 | Simplify Path | 传送门 |
| 72 | Edit Distance | 传送门 |
| 74 | Search a 2D Matrix | 传送门 |
| 76 | Minimum Window Substring | 传送门 |
| 77 | Combinations | 传送门 |
| 79 | Word Search | 传送门 |
| 80 | Remove Duplicates from Sorted Array II | 传送门 |
| 81 | Search in Rotated Sorted Array II | 传送门 |
| 82 | Remove Duplicates from Sorted List II | 传送门 |
| 86 | Partition List | 传送门 |
| 90 | Subsets II | 传送门 |
| 92 | Reverse Linked List II | 传送门 |
| 93 | Restore IP Addresses | 传送门 |
| 95 | Unique Binary Search Trees II | 传送门 |
| 96 | Unique Binary Search Trees | 传送门 |
| 98 | Validate Binary Search Tree | 传送门 |
| 100 | Same Tree | 传送门 |
| 103 | Binary Tree Zigzag Level Order Traversal | 传送门 |
| 105 | Construct Binary Tree from Preorder and Inorder Traversal | 传送门 |
| 106 | Construct Binary Tree from Inorder and Postorder Traversal | 传送门 |
| 108 | Convert Sorted Array to Binary Search Tree | 传送门 |
| 109 | Convert Sorted List to Binary Search Tree | 传送门 |
| 110 | Balanced Binary Tree | 传送门 |
| 111 | Minimum Depth of Binary Tree | 传送门 |
| 112 | Path Sum | 传送门 |
| 113 | Path Sum II | 传送门 |
| 114 | Flatten Binary Tree to Linked List | 传送门 |
| 116 | Populating Next Right Pointers in Each Node | 传送门 |
| 117 | Populating Next Right Pointers in Each Node II | 传送门 |
| 119 | Pascal's Triangle II | 传送门 |
| 120 | Triangle | 传送门 |
| 121 | Best Time to Buy and Sell Stock | 传送门 |
| 124 | Binary Tree Maximum Path Sum | 传送门 |
| 129 | Sum Root to Leaf Numbers | 传送门 |
| 131 | Palindrome Partitioning | 传送门 |
| 137 | Single Number II | 传送门 |
| 138 | Copy List with Random Pointer | 传送门 |
| 143 | Reorder List | 传送门 |
| 144 | Binary Tree Preorder Traversal | 传送门 |
| 145 | Binary Tree Postorder Traversal | 传送门 |
| 146 | LRU Cache | 传送门 |
| 147 | Insertion Sort List | 传送门 |
| 150 | Evaluate Reverse Polish Notation | 传送门 |
| 151 | Reverse Words in a String | 传送门 |
| 162 | Find Peak Element | 传送门 |
| 165 | Compare Version Numbers | 传送门 |
| 167 | Two Sum II - Input array is sorted | 传送门 |
| 169 | Majority Element | 传送门 |
| 172 | Factorial Trailing Zeroes | 传送门 |
| 173 | Binary Search Tree Iterator | 传送门 |
| 187 | Repeated DNA Sequences | 传送门 |
| 189 | Rotate Array | 传送门 |
| 198 | House Robber | 传送门 |
| 199 | Binary Tree Right Side View | 传送门 |
| 200 | Number of Islands | 传送门 |
| 202 | Happy Number | 传送门 |
| 203 | Remove Linked List Elements | 传送门 |
| 205 | Isomorphic Strings | 传送门 |
| 206 | Reverse Linked List | 传送门 |
| 213 | House Robber II | 传送门 |
| 216 | Combination Sum III | 传送门 |
| 219 | Contains Duplicate II | 传送门 |
| 222 | Count Complete Tree Nodes | 传送门 |
| 225 | Implement Stack using Queues | 传送门 |
| 226 | Invert Binary Tree | 传送门 |
| 228 | Summary Ranges | 传送门 |
| 234 | Palindrome Linked List | 传送门 |
| 242 | Valid Anagram | 传送门 |
| 283 | Move Zeroes | 传送门 |
| 287 | Find the Duplicate Number | 传送门 |
| 289 | Game of Life | 传送门 |
| 299 | Bulls and Cows | 传送门 |
| 300 | Longest Increasing Subsequence | 传送门 |
| 303 | Range Sum Query - Immutable | 传送门 |
| 322 | Coin Change | 传送门 |
| 326 | Power of Three | 传送门 |
| 338 | Counting Bits | 传送门 |
| 342 | Power of Four | 传送门 |
| 345 | Reverse Vowels of a String | 传送门 |
| 347 | Top K Frequent Elements | 传送门 |
| 349 | Intersection of Two Arrays | 传送门 |
| 350 | Intersection of Two Arrays II | 传送门 |
| 376 | Number Complement | 传送门 |
| 383 | Ransom Note | 传送门 |
| 392 | Is Subsequence | 传送门 |
| 406 | Queue Reconstruction by Height | 传送门 |
| 409 | Longest Palindrome | 传送门 |
| 429 | N-ary Tree Level Order Traversal | 传送门 |
| 438 | Find All Anagrams in a String | 传送门 |
| 450 | Delete Node in a BST | 传送门 |
| 461 | Hamming Distance | 传送门 |
| 468 | Validate IP Address | 传送门 |
| 477 | Total Hamming Distance | 传送门 |
| 482 | License Key Formatting | 传送门 |
| 485 | Max Consecutive Ones | 传送门 |
| 495 | Teemo Attacking | 传送门 |
| 504 | Base 7 | 传送门 |
| 506 | Relative Ranks | 传送门 |
| 507 | Perfect Number | 传送门 |
| 508 | Most Frequent Subtree Sum | 传送门 |
| 509 | Fibonacci Number | 传送门 |
| 513 | Find Bottom Left Tree Value | 传送门 |
| 515 | Find Largest Value in Each Tree Row | 传送门 |
| 520 | Detect Capital | 传送门 |
| 537 | Complex Number Multiplication | 传送门 |
| 539 | Minimum Time Difference | 传送门 |
| 540 | Single Element in a Sorted Array | 传送门 |
| 543 | Diameter of Binary Tree | 传送门 |
| 547 | Friend Circles | 传送门 |
| 551 | Student Attendance Record I | 传送门 |
| 556 | Reshape the Matrix | 传送门 |
| 559 | Maximum Depth of N-ary Tree | 传送门 |
| 561 | Array Partition I | 传送门 |
| 589 | N-ary Tree Preorder Traversal | 传送门 |
| 590 | N-ary Tree Postorder Traversal | 传送门 |
| 606 | Construct String from Binary Tree | 传送门 |
| 638 | Shopping Offers | 传送门 |
| 661 | Image Smoother | 传送门 |
| 695 | Max Area of Island | 传送门 |
| 697 | Degree of an Array | 传送门 |
| 701 | Insert into a Binary Search Tree | 传送门 |
| 771 | Jewels and Stones | 传送门 |
| 791 | Custom Sort String | 传送门 |
| 820 | Short Encoding of Words | 传送门 |
| 836 | Rectangle Overlap | 传送门 |
| 892 | Surface Area of 3D Shapes | 传送门 |
| 914 | X of a Kind in a Deck of Cards | 传送门 |
| 994 | Rotting Oranges | 传送门 |
| 999 | Available Captures for Rook | 传送门 |
| 1013 | Partition Array Into Three Parts With Equal Sum | 传送门 |
| 1035 | Uncrossed Lines | 传送门 |
| 1051 | Height Checker | 传送门 |
| 1052 | Grumpy Bookstore Owner | 传送门 |
| 1071 | Greatest Common Divisor of Strings | 传送门 |
| 1078 | Occurrences After Bigram | 传送门 |
| 1103 | Distribute Candies to People | 传送门 |
| 1108 | Defanging an IP Address | 传送门 |
| 1114 | Print in Order | 传送门 |
| 1115 | Print FooBar Alternately | 传送门 |
| 1122 | Relative Sort Array | 传送门 |
| 1160 | Find Words That Can Be Formed by Characters | 传送门 |
| 1239 | Maximum Length of a Concatenated String with Unique Characters | 传送门 |
| 1290 | Convert Binary Number in a Linked List to Integer | 传送门 |
| 1295 | Find Numbers with Even Number of Digits | 传送门 |
| 1304 | Find N Unique Integers Sum up to Zero | 传送门 |
| 1311 | Get Watched Videos by Your Friends | 传送门 |
JavaScript :
| 编号 | 题目名 | 操作 |
|---|---|---|
| 12 | Integer to Roman | 传送门 |
| 13 | Roman to Integer | 传送门 |
| 17 | Letter Conbinations of a Phone Number | 传送门 |
| 19 | Remove Nth Node from End of List | 传送门 |
| 27 | Remove Element | 传送门 |
| 28 | Implement strStr() | 传送门 |
| 35 | Search Insert Position | 传送门 |
| 38 | Count and Say | 传送门 |
| 53 | Maximum Subarray | 传送门 |
| 55 | Jump Game | 传送门 |
| 58 | Length of Last Word | 传送门 |
| 66 | Plus One | 传送门 |
| 67 | Add Binary | 传送门 |
| 69 | Sqrt X | 传送门 |
| 70 | Climbing Stairs | 传送门 |
| 83 | Remove Duplicates from Sorted List | 传送门 |
| 88 | Merge Sorted Array | 传送门 |
| 94 | Binary Tree Inorder Traversal | 传送门 |
| 101 | Symmetric Tree | 传送门 |
| 102 | Binary Tree Level Order Traversal | 传送门 |
| 104 | Maximum Depth of Binary Tree | 传送门 |
| 107 | Binary Tree Level Order Traversal II | 传送门 |
| 118 | Pascel's Traingle | 传送门 |
| 121 | Best Time to Buy and Sell Stock | 传送门 |
| 141 | Linked List Cycle | 传送门 |
| 142 | Linker List Cycle II | 传送门 |
| 160 | Intersection of Two Linker Lists | 传送门 |
| 171 | Excel Sheet Column Number | 传送门 |
| 191 | Number of 1 Bits | 传送门 |
| 338 | Counting Bits | 传送门 |
| 412 | Fizz Buzz | 传送门 |
| 496 | Next Greater Element I | 传送门 |
| 500 | Keyboard Row | 传送门 |
| 535 | Encode and Decode TinyURL | 传送门 |
| 867 | Transpose Matrix | 传送门 |
| 868 | Binary Gap | 传送门 |
| 961 | N-Repeated Element in Size 2N Array | 传送门 |
| 1089 | Duplicate Zeros | 传送门 |
| 1160 | Find Words That Can Be Formed by Characters | 传送门 |
Python :
| 编号 | 题目名 | 操作 |
|---|---|---|
| 1 | Two Sum | 传送门 |
| 2 | Add Two Numbers | 传送门 |
| 3 | Longest Substring without Repeating Characters | 传送门 |
| 4 | Median of Two Sorted Arrays | 传送门 |
| 5 | Longest Palindromic Substring | 传送门 |
| 7 | Reverse Integer | 传送门 |
| 8 | String to Integer | 传送门 |
| 9 | Palindrome NUmber | 传送门 |
| 20 | Valid Parentheses | 传送门 |
| 21 | Merge Two Sorted Lists | 传送门 |
| 22 | Generate Parenthesis | 传送门 |
| 23 | Merge K Sorted Lists | 传送门 |
| 33 | Search in Rotated Sorted Array | 传送门 |
| 35 | Search Insert Position | 传送门 |
| 43 | Multiply Strings | 传送门 |
| 46 | Permutations | 传送门 |
| 53 | Maximum Subarray | 传送门 |
| 54 | Spiral Matrix | 传送门 |
| 58 | Length of Last Word | 传送门 |
| 59 | Spiral Matrix II | 传送门 |
| 61 | Rotate List | 传送门 |
| 62 | Unique Paths | 传送门 |
| 70 | Climbing Stairs | 传送门 |
| 78 | Subsets | 传送门 |
| 88 | Merge Sorted Array | 传送门 |
| 89 | Gray Code | 传送门 |
| 102 | Binary Tree Level Order Traversal | 传送门 |
| 104 | Maximum Depth of Binary Tree | 传送门 |
| 107 | Binary Tree Level Order Traversal II | 传送门 |
| 121 | Best Time to Buy and Sell Stock | 传送门 |
| 122 | Best Time to Buy and Sell Stock | 传送门 |
| 124 | Binary Tree Maximum Path Sum | 传送门 |
| 136 | Single Number | 传送门 |
| 148 | Sort List | 传送门 |
| 155 | Min Stack | 传送门 |
| 169 | Majority Element | 传送门 |
| 206 | Reverse Linked List | 传送门 |
| 215 | Kth Largest Element in an Array | 传送门 |
| 217 | Contains Duplicate | 传送门 |
| 225 | Implement Stack using Queues | 传送门 |
| 230 | Kth Smallest Element in a BST | 传送门 |
| 231 | Power of Two | 传送门 |
| 235 | Lowest Common Ancestor of a Binary Search Tree | 传送门 |
| 236 | Lowest Common Ancestor of a Binary Tree | 传送门 |
| 237 | Delete Node in a Linked List | 传送门 |
| 238 | Product of Array Except Self | 传送门 |
| 292 | Min Stack | 传送门 |
| 342 | Power of Four | 传送门 |
| 344 | Reverse String | 传送门 |
| 463 | Island Perimeter | 传送门 |
| 482 | License Key Formatting | 传送门 |
| 500 | Keyboard Row | 传送门 |
| 539 | Minimum Time Difference | 传送门 |
| 557 | Reverse Words in String III | 传送门 |
| 764 | Largest Plus Sign | 传送门 |