leetcode/

directory
v0.0.0-...-59bd94c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2021 License: MIT

README

leetcode 题目目录

# Title Difficulty
1 Two Sum Easy
2 Add Two Numbers Medium
3 Longest Substring Without Repeating Characters Medium
4 Median of Two Sorted Arrays Hard
5 Longest Palindromic Substring Medium
6 ZigZag Conversion Medium
7 Reverse Integer Easy
8 String to Integer (atoi) Medium
9 Palindrome Number Easy
10 Regular Expression Matching Hard
11 Container With Most Water Medium
12 Integer to Roman Medium
13 Roman to Integer Easy
14 Longest Common Prefix Easy
15 3Sum Medium
16 3Sum Closest Medium
17 Letter Combinations of a Phone Number Medium
18 4Sum Medium
19 Remove Nth Node From End of List Medium
20 Valid Parentheses Easy
21 Merge Two Sorted Lists Easy
22 Generate Parentheses Medium
23 Merge k Sorted Lists Hard
24 Swap Nodes in Pairs Medium
25 Reverse Nodes in k-Group Hard
26 Remove Duplicates from Sorted Array Easy
27 Remove Element Easy
28 Implement strStr() Easy
29 Divide Two Integers Medium
30 Substring with Concatenation of All Words Hard
31 Next Permutation Medium
32 Longest Valid Parentheses Hard
33 Search in Rotated Sorted Array Medium
34 Search for a Range Medium
35 Search Insert Position Easy
36 Valid Sudoku Medium
37 Sudoku Solver Hard
38 Count and Say Easy
39 Combination Sum Medium
40 Combination Sum II Medium
41 First Missing Positive Hard
42 Trapping Rain Water Hard
43 Multiply Strings Medium
44 Wildcard Matching Hard
45 Jump Game II Hard
46 Permutations Medium
47 Permutations II Medium
48 Rotate Image Medium
49 Group Anagrams Medium
50 Pow(x, n) Medium
51 N-Queens Hard
52 N-Queens II Hard
53 Maximum Subarray Easy
54 Spiral Matrix Medium
55 Jump Game Medium
56 Merge Intervals Medium
57 Insert Interval Hard
58 Length of Last Word Easy
59 Spiral Matrix II Medium
60 Permutation Sequence Medium
61 Rotate List Medium
62 Unique Paths Medium
63 Unique Paths II Medium
64 Minimum Path Sum Medium
65 Valid Number Hard
66 Plus One Easy
67 Add Binary Easy
68 Text Justification Hard
69 Sqrt(x) Easy
70 Climbing Stairs Easy
71 Simplify Path Medium
72 Edit Distance Hard
73 Set Matrix Zeroes Medium
74 Search a 2D Matrix Medium
75 Sort Colors Medium
76 Minimum Window Substring Hard
77 Combinations Medium
78 Subsets Medium
79 Word Search Medium
80 Remove Duplicates from Sorted Array II Medium
81 Search in Rotated Sorted Array II Medium
82 Remove Duplicates from Sorted List II Medium
83 Remove Duplicates from Sorted List Easy
84 Largest Rectangle in Histogram Hard
85 Maximal Rectangle Hard
86 Partition List Medium
87 Scramble String Hard
88 Merge Sorted Array Easy
89 Gray Code Medium
90 Subsets II Medium
91 Decode Ways Medium
92 Reverse Linked List II Medium
93 Restore IP Addresses Medium
94 Binary Tree Inorder Traversal Medium
95 Unique Binary Search Trees II Medium
96 Unique Binary Search Trees Medium
97 Interleaving String Hard
98 Validate Binary Search Tree Medium
99 Recover Binary Search Tree Hard
100 Same Tree Easy
101 Symmetric Tree Easy
102 Binary Tree Level Order Traversal Medium
103 Binary Tree Zigzag Level Order Traversal Medium
104 Maximum Depth of Binary Tree Easy
105 Construct Binary Tree from Preorder and Inorder Traversal Medium
106 Construct Binary Tree from Inorder and Postorder Traversal Medium
107 Binary Tree Level Order Traversal II Easy
108 Convert Sorted Array to Binary Search Tree Easy
109 Convert Sorted List to Binary Search Tree Medium
110 Balanced Binary Tree Easy
111 Minimum Depth of Binary Tree Easy
112 Path Sum Easy
113 Path Sum II Medium
114 Flatten Binary Tree to Linked List Medium
115 Distinct Subsequences Hard
118 Pascal's Triangle Easy
119 Pascal's Triangle II Easy
120 Triangle Medium
121 Best Time to Buy and Sell Stock Easy
122 Best Time to Buy and Sell Stock II Easy
123 Best Time to Buy and Sell Stock III Hard
124 Binary Tree Maximum Path Sum Hard
125 Valid Palindrome Easy
126 Word Ladder II Hard
127 Word Ladder Medium
128 Longest Consecutive Sequence Hard
129 Sum Root to Leaf Numbers Medium
130 Surrounded Regions Medium
131 Palindrome Partitioning Medium
132 Palindrome Partitioning II Hard
134 Gas Station Medium
135 Candy Hard
136 Single Number Easy
137 Single Number II Medium
139 Word Break Medium
140 Word Break II Hard
141 Linked List Cycle Easy
142 Linked List Cycle II Medium
143 Reorder List Medium
144 Binary Tree Preorder Traversal Medium
145 Binary Tree Postorder Traversal Hard
146 LRU Cache Medium
147 Insertion Sort List Medium
148 Sort List Medium
149 Max Points on a Line Hard
150 Evaluate Reverse Polish Notation Medium
151 Reverse Words in a String Medium
152 Maximum Product Subarray Medium
153 Find Minimum in Rotated Sorted Array Medium
154 Find Minimum in Rotated Sorted Array II Hard
155 Min Stack Easy
160 Intersection of Two Linked Lists Easy
162 Find Peak Element Medium
164 Maximum Gap Hard
165 Compare Version Numbers Medium
166 Fraction to Recurring Decimal Medium
167 Two Sum II - Input array is sorted Easy
168 Excel Sheet Column Title Easy
169 Majority Element Easy
171 Excel Sheet Column Number Easy
172 Factorial Trailing Zeroes Easy
173 Binary Search Tree Iterator Medium
174 Dungeon Game Hard
179 Largest Number Medium
187 Repeated DNA Sequences Medium
188 Best Time to Buy and Sell Stock IV Hard
189 Rotate Array Easy
190 Reverse Bits Easy
191 Number of 1 Bits Easy
198 House Robber Easy
199 Binary Tree Right Side View Medium
200 Number of Islands Medium
201 Bitwise AND of Numbers Range Medium
202 Happy Number Easy
203 Remove Linked List Elements Easy
204 Count Primes Easy
205 Isomorphic Strings Easy
206 Reverse Linked List Easy
207 Course Schedule Medium
208 Implement Trie (Prefix Tree) Medium
209 Minimum Size Subarray Sum Medium
210 Course Schedule II Medium
211 Add and Search Word - Data structure design Medium
212 Word Search II Hard
213 House Robber II Medium
214 Shortest Palindrome Hard
215 Kth Largest Element in an Array Medium
216 Combination Sum III Medium
217 Contains Duplicate Easy
219 Contains Duplicate II Easy
220 Contains Duplicate III Medium
221 Maximal Square Medium
222 Count Complete Tree Nodes Medium
223 Rectangle Area Medium
225 Implement Stack using Queues Easy
226 Invert Binary Tree Easy
227 Basic Calculator II Medium
228 Summary Ranges Medium
229 Majority Element II Medium
230 Kth Smallest Element in a BST Medium
231 Power of Two Easy
232 Implement Queue using Stacks Easy
234 Palindrome Linked List Easy
235 Lowest Common Ancestor of a Binary Search Tree Easy
236 Lowest Common Ancestor of a Binary Tree Medium
237 Delete Node in a Linked List Easy
238 Product of Array Except Self Medium
240 Search a 2D Matrix II Medium
241 Different Ways to Add Parentheses Medium
242 Valid Anagram Easy
257 Binary Tree Paths Easy
258 Add Digits Easy
260 Single Number III Medium
263 Ugly Number Easy
264 Ugly Number II Medium
268 Missing Number Easy
274 H-Index Medium
275 H-Index II Medium
279 Perfect Squares Medium
283 Move Zeroes Easy
287 Find the Duplicate Number Medium
289 Game of Life Medium
290 Word Pattern Easy
292 Nim Game Easy
299 Bulls and Cows Medium
300 Longest Increasing Subsequence Medium
303 Range Sum Query - Immutable Easy
304 Range Sum Query 2D - Immutable Medium
306 Additive Number Medium
307 Range Sum Query - Mutable Medium
322 Coin Change Medium
324 Wiggle Sort II Medium
326 Power of Three Easy
328 Odd Even Linked List Medium
332 Reconstruct Itinerary Medium
334 Increasing Triplet Subsequence Medium
342 Power of Four Easy
344 Reverse String Easy
345 Reverse Vowels of a String Easy
347 Top K Frequent Elements Medium
349 Intersection of Two Arrays Easy
350 Intersection of Two Arrays II Easy
367 Valid Perfect Square Easy
371 Sum of Two Integers Easy
378 Kth Smallest Element in a Sorted Matrix Medium
380 Insert Delete GetRandom O(1) Medium
383 Ransom Note Easy
384 Shuffle an Array Medium
387 First Unique Character in a String Easy
389 Find the Difference Easy
392 Is Subsequence Easy
395 Longest Substring with At Least K Repeating Characters Medium
400 Nth Digit Easy
401 Binary Watch Easy
403 Frog Jump Hard
404 Sum of Left Leaves Easy
405 Convert a Number to Hexadecimal Easy
409 Longest Palindrome Easy
412 Fizz Buzz Easy
414 Third Maximum Number Easy
415 Add Strings Easy
434 Number of Segments in a String Easy
437 Path Sum III Easy
438 Find All Anagrams in a String Easy
441 Arranging Coins Easy
443 String Compression Easy
445 Add Two Numbers II Medium
447 Number of Boomerangs Easy
448 Find All Numbers Disappeared in an Array Easy
453 Minimum Moves to Equal Array Elements Easy
454 4Sum II Medium
455 Assign Cookies Easy
458 Poor Pigs Easy
459 Repeated Substring Pattern Easy
461 Hamming Distance Easy
463 Island Perimeter Easy
475 Heaters Easy
476 Number Complement Easy
479 Largest Palindrome Product Easy
482 License Key Formatting Easy
485 Max Consecutive Ones Easy
492 Construct the Rectangle Easy
496 Next Greater Element I Easy
500 Keyboard Row Easy
501 Find Mode in Binary Search Tree Easy
504 Base 7 Easy
506 Relative Ranks Easy
507 Perfect Number Easy
509 Fibonacci Number Easy
520 Detect Capital Easy
521 Longest Uncommon Subsequence I Easy
530 Minimum Absolute Difference in BST Easy
532 K-diff Pairs in an Array Easy
538 Convert BST to Greater Tree Easy
541 Reverse String II Easy
543 Diameter of Binary Tree Easy
551 Student Attendance Record I Easy
557 Reverse Words in a String III Easy
561 Array Partition I Easy
563 Binary Tree Tilt Easy
566 Reshape the Matrix Easy
572 Subtree of Another Tree Easy
575 Distribute Candies Easy
581 Shortest Unsorted Continuous Subarray Easy
594 Longest Harmonious Subsequence Easy
598 Range Addition II Easy
599 Minimum Index Sum of Two Lists Easy
604 Design Compressed String Iterator Easy
605 Can Place Flowers Easy
606 Construct String from Binary Tree Easy
617 Merge Two Binary Trees Easy
624 Maximum Distance in Arrays Easy
628 Maximum Product of Three Numbers Easy
633 Sum of Square Numbers Easy
637 Average of Levels in Binary Tree Easy
643 Maximum Average Subarray I Easy
644 Maximum Average Subarray II Hard
645 Set Mismatch Easy
646 Maximum Length of Pair Chain Medium
647 Palindromic Substrings Medium
648 Replace Words Medium
653 Two Sum IV - Input is a BST Easy
654 Maximum Binary Tree Medium
655 Print Binary Tree Medium
657 Judge Route Circle Easy
658 Find K Closest Elements Medium
661 Image Smoother Easy
662 Maximum Width of Binary Tree Medium
665 Non-decreasing Array Easy
669 Trim a Binary Search Tree Easy
670 Maximum Swap Medium
671 Second Minimum Node In a Binary Tree Easy
674 Longest Continuous Increasing Subsequence Easy
680 Valid Palindrome II Easy
682 Baseball Game Easy
686 Repeated String Match Easy
687 Longest Univalue Path Easy
693 Binary Number with Alternating Bits Easy
695 Max Area of Island Easy
696 Count Binary Substrings Easy
697 Degree of an Array Easy
700 Search in a Binary Search Tree Easy
703 Kth Largest Element in a Stream Easy
704 Binary Search Easy
705 Design HashSet Easy
706 Design HashMap Easy
707 Design Linked List Easy
709 To Lower Case Easy
717 1-bit and 2-bit Characters Easy
720 Longest Word in Dictionary Easy
724 Find Pivot Index Easy
725 Split Linked List in Parts Medium
728 Self Dividing Numbers Easy
733 Flood Fill Easy
734 Sentence Similarity Easy
737 Sentence Similarity II Medium
744 Find Smallest Letter Greater Than Target Easy
746 Min Cost Climbing Stairs Easy
747 Largest Number At Least Twice of Others Easy
748 Shortest Completing Word Easy
760 Find Anagram Mappings Easy
762 Prime Number of Set Bits in Binary Representation Easy
766 Toeplitz Matrix Easy
771 Jewels and Stones Easy
783 Minimum Distance Between BST Nodes Easy
784 Letter Case Permutation Easy
788 Rotated Digits Easy
804 Unique Morse Code Words Easy
806 Number of Lines To Write String Easy
811 Subdomain Visit Count Easy
812 Largest Triangle Area Easy
817 Linked List Components Medium
819 Most Common Word Easy
821 Shortest Distance to a Character Easy
824 Goat Latin Easy
830 Positions of Large Groups Easy
832 Flipping an Image Easy
836 Rectangle Overlap Easy
840 Magic Squares In Grid Easy
844 Backspace String Compare Easy
849 Maximize Distance to Closest Person Easy
852 Peak Index in a Mountain Array Easy
867 Transpose Matrix Easy
872 Leaf-Similar Trees Easy
876 Middle of the Linked List Easy
883 Projection Area of 3D Shapes Easy
884 Uncommon Words from Two Sentences Easy
888 Fair Candy Swap Easy
892 Surface Area of 3D Shapes Easy
893 Groups of Special-Equivalent Strings Easy
896 Monotonic Array Easy
897 Increasing Order Search Tree Easy
905 Sort Array By Parity Easy
908 Smallest Range I Easy
914 X of a Kind in a Deck of Cards Easy
917 Reverse Only Letters Easy
922 Sort Array By Parity II Easy
925 Long Pressed Name Easy
929 Unique Email Addresses Easy
937 Reorder Log Files Easy
941 Valid Mountain Array Easy
942 DI String Match Easy
944 Delete Columns to Make Sorted Easy
949 Largest Time for Given Digits Easy
953 Verifying an Alien Dictionary Easy
961 N-Repeated Element in Size 2N Array Easy
965 Univalued Binary Tree Easy
970 Powerful Integers Easy
973 K Closest Points to Origin Easy
976 Largest Perimeter Triangle Easy
977 Squares of a Sorted Array Easy
984 String Without AAA or BBB Easy
985 Sum of Even Numbers After Queries Easy
989 Add to Array-Form of Integer Easy
993 Cousins in Binary Tree Easy
994 Rotting Oranges Easy
997 Find the Town Judge Easy
999 Available Captures for Rook Easy
1002 Find Common Characters Easy
1025 Divisor Game Easy

Directories

Path Synopsis
https://leetcode.com/problems/add-to-array-form-of-integer/description/ For a non-negative integer X, the array-form of X is an array of its digits in left to right order.
https://leetcode.com/problems/add-to-array-form-of-integer/description/ For a non-negative integer X, the array-form of X is an array of its digits in left to right order.
https://leetcode.com/problems/number-of-1-bits/ Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight).
https://leetcode.com/problems/number-of-1-bits/ Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight).
https://leetcode.com/problems/climbing-stairs/#/description ou are climbing a stair case.
https://leetcode.com/problems/climbing-stairs/#/description ou are climbing a stair case.
https://leetcode.com/problems/find-common-characters/description/ Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates).
https://leetcode.com/problems/find-common-characters/description/ Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates).
https://leetcode.com/problems/add-two-numbers/#/description You are given two non-empty linked lists representing two non-negative integers.
https://leetcode.com/problems/add-two-numbers/#/description You are given two non-empty linked lists representing two non-negative integers.
https://leetcode.com/problems/palindrome-number/#/description Determine whether an integer is a palindrome.
https://leetcode.com/problems/palindrome-number/#/description Determine whether an integer is a palindrome.
https://leetcode.com/problems/poor-pigs/description/ There are 1000 buckets, one and only one of them contains poison, the rest are filled with water.
https://leetcode.com/problems/poor-pigs/description/ There are 1000 buckets, one and only one of them contains poison, the rest are filled with water.
https://leetcode.com/problems/min-stack/#/description Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
https://leetcode.com/problems/min-stack/#/description Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
https://leetcode.com/problems/add-binary/#/description Given two binary strings, return their sum (also a binary string).
https://leetcode.com/problems/add-binary/#/description Given two binary strings, return their sum (also a binary string).
https://leetcode.com/problems/increasing-order-search-tree/ Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, \ and every node has no left child and only 1 right child.
https://leetcode.com/problems/increasing-order-search-tree/ Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, \ and every node has no left child and only 1 right child.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL