- Notes: π means your subscription of LeetCode Premium Membership is required for reading the question.
# | Title | Difficulty | Solution |
---|---|---|---|
1 | Two Sum | Go | |
2 | Add Two Numbers | Go | |
3 | Longest Substring Without Repeating Characters | Go | |
9 | Palindrome Number | Go | |
11 | Container With Most Water | Go | |
13 | Roman to Integer | ||
14 | Longest Common Prefix | ||
15 | 3Sum | Go | |
16 | 3Sum Closest | Go | |
17 | Letter Combinations of a Phone Number | Go | |
18 | 4Sum | Go | |
20 | Valid Parentheses | Go | |
21 | Merge Two Sorted Lists | ||
26 | Remove Duplicates from Sorted Array | Go | |
27 | Remove Element | Go | |
28 | Find the Index of the First Occurrence in a String | Go | |
31 | Next Permutation | Go | |
35 | Search Insert Position | Go | |
46 | Permutations | Go | |
48 | Rotate Image | Go | |
52 | N-Queens II | Go | |
53 | Maximum Subarray | ||
54 | Spiral Matrix | Go | |
58 | Length of Last Word | ||
61 | Rotate List | Go | |
66 | Plus One | ||
67 | Add Binary | ||
69 | Sqrt(x) | ||
70 | Climbing Stairs | ||
73 | Set Matrix Zeroes | Go | |
75 | Sort Colors | Go | |
83 | Remove Duplicates from Sorted List | ||
88 | Merge Sorted Array | Go | |
94 | Binary Tree Inorder Traversal | ||
98 | Validate Binary Search Tree | Go | |
100 | Same Tree | GO | |
101 | Symmetric Tree | ||
102 | Binary Tree Level Order Traversal | Go | |
104 | Maximum Depth of Binary Tree | Go | |
105 | Construct Binary Tree from Preorder and Inorder Traversal | Go | |
110 | Balanced Binary Tree | ||
121 | Best Time to Buy and Sell Stock | ||
125 | Valid Palindrome | Go | |
133 | 133.clone_graph | Go | |
136 | Single Number | Go | |
141 | Linked List Cycle | Go | |
142 | Linked List Cycle II | Go | |
143 | Reorder List | Go | |
144 | Binary Tree Preorder Traversal | ||
145 | Binary Tree Postorder Traversal | ||
151 | Reverse Words in a String | Go | |
159 | Longest Substring with At Most Two Distinct Characters π | Go | |
160 | Intersection of Two Linked Lists | Go | |
162 | Find Peak Element | Go | |
167 | Two Sum II - Input Array Is Sorted | Go | |
170 | Two Sum III - Data structure design π | Go | |
171 | Excel Sheet Column Number | Go | |
175 | Combine Two Tables | ||
176 | Second Highest Salary | MySQL | |
180 | Consecutive Numbers | MySQL | |
185 | Department Top Three Salaries | MySQL | |
186 | Reverse Words in a String II π | Go | |
190 | Reverse Bits | Go | |
191 | Number of 1 Bits | Go | |
196 | Delete Duplicate Emails | MySQL | |
197 | Rising Temperature | MySQL | |
199 | Binary Tree Right Side View | Go | |
202 | Happy Number | Go | |
206 | Reverse Linked List | Go | |
208 | Implement Trie (Prefix Tree) | Go | |
215 | Kth Largest Element in an Array | Go | |
216 | Combination Sum III | Go | |
217 | Contains Duplicate | Go | |
219 | Contains Duplicate II | Go | |
222 | Count Complete Tree Nodes | Go | |
225 | Implement Stack using Queues | ||
226 | Invert Binary Tree | Go | |
230 | Kth Smallest Element in a BST | Go | |
234 | Palindrome Linked List | Go | |
236 | Lowest Common Ancestor of a Binary tree | Go | |
238 | Product of Array Except Self | Go | |
242 | Valid Anagram | Go | |
246 | Strobogrammatic Number π | Go | |
253 | Meeting Rooms II π | Go | |
278 | First Bad Version | ||
283 | Move Zeroes | Go | |
328 | Odd Even Linked List | Go | |
334 | Increasing Triplet Subsequence | Go | |
338 | Counting Bits | Go | |
340 | Longest Substring with At Most K Distinct Characters π | Go | |
344 | Reverse String | Go | |
345 | Reverse Vowels of a String | Go | |
347 | Top K Frequent Elements | Go | |
349 | Intersection of Two Arrays | Go | |
350 | Intersection of Two Arrays II | Go | |
371 | Sum of Two Integers | Go | |
374 | Guess Number Higher or Lower | Go | |
392 | Is Subsequence | Go | |
394 | Decode String | Go | |
395 | Longest Substring with At Least K Repeatin | Go | |
399 | Evaluate Division | Go | |
408 | Valid Word Abbreviation π | Go | |
412 | Fizz Buzz | Go | |
415 | Add Strings | Go | |
437 | Path Sum III | Go | |
443 | String Compression | Go | |
450 | Delete Node in a BST | go | |
455 | Assign Cookies | Go | |
457 | Circular Array Loop | Go | |
489 | Robot Room Cleaner π | Go | |
490 | The Maze π | Go | |
496 | Next Greater Element I | Go | |
541 | Reverse String II | Go | |
547 | Number of Provinces | Go | |
550 | Game Play Analysis IV | MySQL | |
557 | Reverse Words in a String III | Go | |
570 | Managers with at Least 5 Direct Reports | MySQL | |
577 | Employee Bonus | MySQL | |
584 | Find Customer Referee | MySQL | |
585 | Investments in 2016 | MySQL | |
595 | Big Countries | Python3 MySQL | |
596 | Classes More Than 5 Students | MySQL | |
602 | Friend Requests II: Who Has the Most Friends | MySQL | |
605 | Can Place Flowers | Go | |
610 | Triangle Judgement | MySQL | |
619 | Biggest Single Number | MySQL | |
620 | Not Boring Movies | MySQL | |
624 | Maximum Distance in Arrays π | Go | |
626 | Exchange Seats | MySQL | |
643 | Maximum Average Subarray I | Go | |
649 | Dota2 Senate | Go | |
653 | Two Sum IV - Input is a BST | Go | |
680 | Valid Palindrome II | Go | |
682 | Baseball Game | Go | |
696 | Count Binary Substrings | Go | |
700 | Search in a Binary Search Tree | Go | |
713 | Subarray Product Less Than K | Go | |
724 | Find Pivot Index | Go | |
735 | Asteroid Collision | Go | |
821 | Shortest Distance to a Character | Go | |
832 | Flipping an Image | Go | |
841 | Keys and Rooms | Go | |
844 | Backspace String Compare | Go | |
872 | Leaf-Similar Trees | Go | |
875 | Koko Eating Bananas | Go | |
876 | Middle of the Linked List | Go | |
897 | Increasing Order Search Tree | ||
905 | Sort Array By Parity | Go | |
917 | Reverse Only Letters | Go | |
922 | Sort Array By Parity II | Go | |
925 | Long Pressed Name | Go | |
933 | Number of Recent Calls | ||
942 | DI String Match | Go | |
977 | Squares of a Sorted Array | Go | |
994 | Rotting Oranges | Go | |
1002 | Find Common Characters | Go | |
1004 | Max Consecutive Ones III | Go | |
1021 | Remove Outermost Parentheses | ||
1045 | Customers Who Bought All Products | MySQL | |
1047 | Remove All Adjacent Duplicates In String | Go | |
1056 | Confusing Number π | Go | |
1068 | Product Sales Analysis I | MySQL | |
1070 | Product Sales Analysis III | MySQL | |
1071 | Greatest Common Divisor of Strings | Go | |
1075 | Project Employees I | MySQL | |
1088 | Confusing Number II π | Go | |
1089 | Duplicate Zeros | Go | |
1099 | Two Sum Less Than K π | Go | |
1120 | Maximum Average Subtree π | Go | |
1137 | N-th Tribonacci Number | Go | |
1141 | User Activity for the Past 30 Days I | MySQL | |
1148 | Article Views I | MySQL | |
1160 | Find Words That Can Be Formed by Characters | Go | |
1161 | Maximum Level Sum of a Binary Tree | Go | |
1164 | Product Price at a Given Date | MySQL | |
1174 | Immediate Food Delivery II | MySQL | |
1176 | Diet Plan Performance π | Go | |
1193 | Monthly Transactions I | MySQL | |
1204 | Last Person to Fit in the Bus | MySQL | |
1207 | Unique Number of Occurrences | Go | |
1211 | Queries Quality and Percentage | MySQL | |
1251 | Average Selling Price | MySQL | |
1268 | Search Suggestions System | Go | |
1280 | Students and Examinations | MySQL | |
1321 | Restaurant Growth | MySQL | |
1327 | List the Products Ordered in a Period | MySQL | |
1341 | Movie Rating | MySQL | |
1372 | Longest ZigZag Path in a Binary Tree | Go | |
1378 | Replace Employee ID With The Unique Identifier | MySQL | |
1385 | Find the Distance Value Between Two Arrays | Go | |
1403 | Minimum Subsequence in Non-Increasing | ||
1431 | Kids With the Greatest Number of Candies | Go | |
1448 | Count Good Nodes in Binary Tree | Go | |
1456 | Maximum Number of Vowels in a Substring | Go | |
1466 | Reorder Routes to Make All Paths Lead to the City Zero | Go | |
1484 | Group Sold Products By The Date | MySQL | |
1493 | Longest Subarray of 1's After Deleting One Element | Go | |
1527 | Patients With a Condition | MySQL | |
1544 | Make The String Great | Go | |
1561 | Maximum Number of Coins You Can Get | Go | |
1581 | Customer Who Visited but Did Not Make Any Transactions | MySQL | |
1633 | Percentage of Users Attended a Contest | MySQL | |
1661 | Average Time of Process per Machine | MySQL | |
1657 | Determine if Two Strings Are Close | Go | |
1662 | Check If Two String Arrays are Equivalent | Go | |
1667 | Fix Names in a Table | MySQL | |
1679 | Max Number of K-Sum Pairs | Go | |
1683 | Invalid Tweets | MySQL | |
1685 | Sum of Absolute Differences in a Sorted | Go | |
1688 | Count of Matches in Tournament | Go | |
1729 | Find Followers Count | MySQL | |
1731 | The Number of Employees Which Report to Each Employee | MySQL | |
1732 | Find the Highest Altitude | Go | |
1757 | Recyclable and Low Fat Products | Python3 MySQL | |
1768 | Merge Strings Alternately | Go | |
1789 | Primary Department for Each Employee | MySQL | |
1791 | Find Center of Star Graph | Go | |
1826 | Faulty Sensor π | Go | |
1907 | Count Salary Categories | MySQL | |
1926 | Nearest Exit from Entrance in Maze | Go | |
1934 | Confirmation Rate | MySQL | |
1971 | Find if Path Exists in Graph | Go | |
1978 | Employees Whose Manager Left the Company | MySQL | |
2000 | Reverse Prefix of Word | Go | |
2095 | Delete the Middle Node of a Linked List | Go | |
2121 | Intervals Between Identical Elements | Go | |
2130 | Maximum Twin Sum of a Linked List | Go | |
2164 | Sort Even and Odd Indices Independently | Go | |
2215 | Find the Difference of Two Arrays | Go | |
2300 | Successful Pairs of Spells and Potions | Go | |
2336 | Smallest Number in Infinite Set | Go | |
2352 | Equal Row and Column Pairs | Go | |
2356 | Number of Unique Subjects Taught by Each Teacher | MySQL | |
2367 | Number of Arithmetic Triplets | Go | |
2390 | Removing Stars From a String | Go | |
2441 | Largest Positive Integer That Exists With Its Negative | Go | |
2462 | Total Cost to Hire K Workers | Go | |
2542 | Maximum Subsequence Score | Go | |
2562 | Find the Array Concatenation Value | Go | |
2570 | Merge Two 2D Arrays by Summing Values | Go | |
2706 | Buy Two Chocolates | Go | |
2824 | Count Pairs Whose Sum is Less than Target | Go |