A comprehensive collection of LeetCode problem solutions in Python and Java.
| # | Problem |
|---|---|
| 1 | Two Sum |
| 7 | Reverse Integer |
| 9 | Palindrome Number |
| 13 | Roman to Integer |
| 14 | Longest Common Prefix |
| 20 | Valid Parentheses |
| 26 | Remove Duplicates from Sorted Array |
| 27 | Remove Element |
| 58 | Length of Last Word |
| 66 | Plus One |
| 69 | Sqrt(x) |
| 70 | Climbing Stairs |
| 83 | Remove Duplicates from Sorted List |
| 88 | Merge Sorted Array |
| 125 | Valid Palindrome |
| 136 | Single Number |
| 167 | Two Sum II - Input Array Is Sorted |
| 168 | Excel Sheet Column Title |
| 191 | Number of 1 Bits |
| 202 | Happy Number |
| 206 | Reverse Linked List |
| 217 | Contains Duplicate |
| 232 | Implement Queue using Stacks |
| 242 | Valid Anagram |
| 258 | Add Digits |
| 268 | Missing Number |
| 278 | First Bad Version |
| 283 | Move Zeroes |
| 338 | Counting Bits |
| 344 | Reverse String |
| 345 | Reverse Vowels of a String |
| 349 | Intersection of Two Arrays |
| 350 | Intersection of Two Arrays II |
| 374 | Guess Number Higher or Lower |
| 387 | First Unique Character in a String |
| 389 | Find the Difference |
| 412 | Fizz Buzz |
| 414 | Third Maximum Number |
| 509 | Fibonacci Number |
| 628 | Maximum Product of Three Numbers |
| 704 | Binary Search |
| 728 | Self Dividing Numbers |
| 744 | Find Smallest Letter Greater Than Target |
| 746 | Min Cost Climbing Stairs |
| 933 | Number of Recent Calls |
| 1046 | Last Stone Weight |
| 1137 | N-th Tribonacci Number |
| 1544 | Make The String Great |
| 1700 | Number of Students Unable to Eat Lunch |
| 2073 | Time Needed to Buy Tickets |
| 2079 | Watering Plants |
| 2351 | First Letter to Appear Twice |
| 2529 | Maximum Count of Positive Integer and Negative Integer |
| 3174 | Clear Digits |
| # | Problem |
|---|---|
| 11 | Container With Most Water |
| 15 | 3Sum |
| 28 | Find the Index of the First Occurrence in a String |
| 35 | Search Insert Position |
| 71 | Simplify Path |
| 75 | Sort Colors |
| 82 | Remove Duplicates from Sorted List II |
| 118 | Pascal's Triangle |
| 119 | Pascal's Triangle II |
| 121 | Best Time to Buy and Sell Stock |
| 155 | Min Stack |
| 198 | House Robber |
| 207 | Course Schedule |
| 238 | Product of Array Except Self |
| 313 | Super Ugly Number |
| 316 | Remove Duplicate Letters |
| 997 | Find the Town Judge |
| 1003 | Check If Word Is Valid After Substitutions |
| 1021 | Remove Outermost Parentheses |
| 1475 | Final Prices With a Special Discount in a Shop |
| 1971 | Find if Path Exists in Graph |
| 2015 | Watering Plants II |
| 2696 | Minimum String Length After Removing Substrings |
| 2859 | Sum of Values at Indices With K Set Bits |
| 322 | Coin Change |
- Two Sum (1)
- Plus One (66)
- Remove Duplicates from Sorted Array (26)
- Remove Element (27)
- Merge Sorted Array (88)
- Move Zeroes (283)
- Intersection of Two Arrays (349)
- Intersection of Two Arrays II (350)
- Product of Array Except Self (238)
- Contains Duplicate (217)
- Sort Colors (75)
- Maximum Count of Positive Integer and Negative Integer (2529)
- Final Prices With a Special Discount in a Shop (1475)
- Time Needed to Buy Tickets (2073)
- Reverse Integer (7)
- Palindrome Number (9)
- Roman to Integer (13)
- Longest Common Prefix (14)
- Valid Parentheses (20)
- Length of Last Word (58)
- Valid Palindrome (125)
- Reverse String (344)
- Reverse Vowels of a String (345)
- Find the Index of the First Occurrence in a String (28)
- Simplify Path (71)
- Make The String Great (1544)
- Minimum String Length After Removing Substrings (2696)
- Clear Digits (3174)
- Check If Word Is Valid After Substitutions (1003)
- Remove Outermost Parentheses (1021)
- Find the Difference (389)
- First Unique Character in a String (387)
- First Letter to Appear Twice (2351)
- Valid Anagram (242)
- Remove Duplicate Letters (316)
- Add Digits (258)
- Missing Number (268)
- Single Number (136)
- Happy Number (202)
- Fibonacci Number (509)
- Self Dividing Numbers (728)
- Fizz Buzz (412)
- Excel Sheet Column Title (168)
- Number of 1 Bits (191)
- Counting Bits (338)
- Sqrt(x) (69)
- Third Maximum Number (414)
- Maximum Product of Three Numbers (628)
- Sum of Values at Indices With K Set Bits (2859)
- N-th Tribonacci Number (1137)
- Super Ugly Number (313)
- 3Sum (15)
- Container With Most Water (11)
- Two Sum II - Input Array Is Sorted (167)
- Watering Plants (2079)
- Watering Plants II (2015)
- Valid Parentheses (20)
- Min Stack (155)
- Make The String Great (1544)
- Minimum String Length After Removing Substrings (2696)
- Clear Digits (3174)
- Check If Word Is Valid After Substitutions (1003)
- Remove Outermost Parentheses (1021)
- Number of Recent Calls (933)
- Implement Queue using Stacks (232)
- Number of Students Unable to Eat Lunch (1700)
- Search Insert Position (35)
- First Bad Version (278)
- Guess Number Higher or Lower (374)
- Find Smallest Letter Greater Than Target (744)
- Binary Search (704)
- Climbing Stairs (70)
- Min Cost Climbing Stairs (746)
- House Robber (198)
- Best Time to Buy and Sell Stock (121)
- Pascal's Triangle (118)
- Pascal's Triangle II (119)
- Coin Change (322)
- Reverse Linked List (206)
- Remove Duplicates from Sorted List (83)
- Remove Duplicates from Sorted List II (82)
- Course Schedule (207)
- Find if Path Exists in Graph (1971)
- Find the Town Judge (997)
- Last Stone Weight (1046)
.pyfiles: Python solutions.javafiles: Java solutions.sqlfiles: SQL solutions (not included in this summary)
- Binary Search
- Two-Pointer Technique
- Sliding Window
- Stack
- Queue
- Linked List
- Hash Map/Set
- Heap
- Dynamic Programming
- Greedy Algorithm
- Graph Traversal (BFS, DFS)
- XOR Bit Manipulation
All solutions are optimized for correctness and follow LeetCode's class structure. Each solution includes proper docstrings and comments for clarity.