leetcode

module
v0.0.0-...-977205a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT

README

leetcode

Archive of leetcode solutions.

# Title Solution Difficulty
1 Two Sum Javascript, Go Easy
2 Add Two Numbers Typescript, Go Medium
3 Longest Substring Without Repeating Characters Typescript, Go Medium
4 Median of Two Sorted Arrays Typescript Hard
6 Zigzag Conversion Go Medium
8 String to Integer (atoi) Typescript Medium
9 Palindrome Number Typescript, Go Easy
11 Container With Most Water Typescript, Go Medium
12 Integer to Roman Typescript, Go Medium
13 Roman to Integer Typescript, Go Easy
14 Longest Common Prefix Typescript Easy
15 3Sum Typescript Medium
17 Letter Combinations of a Phone Number Go Medium
19 Remove Nth Node From End of List Go Medium
20 Valid Parentheses Typescript, Go Easy
21 Merge Two Sorted Lists Typescript, Go Easy
22 Generate Parentheses Typescript Medium
25 Reverse Nodes in k-Group Go Hard
26 Remove Duplicates from Sorted Array Typescript, Go Easy
27 Remove Element Typescript, Go Easy
28 Find the Index of the First Occurrence in a String Go Easy
29 Divide Two Integers Typescript Medium
35 Search Insert Position Go Easy
36 Valid Sudoku Typescript Medium
37 Sudoku Solver Typescript Hard
39 Combination Sum Go Medium
42 Trapping Rain Water Go Hard
45 Jump Game 2 Go Medium
46 Permutations Python Medium
48 Rotate Image Go Medium
49 Group Anagrams Typescript, Go Medium
54 Spiral Matrix Go Medium
55 Jump Game Go Medium
56 Merge Intervals Go Medium
57 Insert Intervals Go Medium
58 Length of Last Word Go Easy
61 Rotate List Go Medium
62 Unique Paths Go Medium
66 Plus One Go Easy
67 Add Binary Go Easy
68 Text Justification Go Hard
69 Sqrt(x) Go Easy
70 Climbing Stairs Go Easy
71 Simplify Path Go Medium
72 Edit Distance Go Medium
73 Set Matrix Zeroes Go Medium
74 Search a 2D Matrix Typescript Medium
75 Sort Colors Typescript Medium
76 Minimum Window Substring Go Hard
77 Combinations Go Medium
80 Remove Duplicates from Sorted Array II Go Medium
82 Remove Duplicates from Sorted List II Go Medium
86 Partition List Go Medium
88 Merge Sorted Array Typescript, Go Easy
92 Reverse Linked List II Go Medium
98 Validate Binary Search Tree Go Medium
100 Same Tree Typescript, Go Easy
101 Symmetric Tree Go Easy
102 Binary Tree Level Order Traversal Typescript, Go Medium
103 Binary Tree Zigzag Level Order Traversal Go Medium
104 Maximum Depth of Binary Tree Typescript, Go Easy
105 Construct Binary Tree from Preorder and Inorder Traversal Go Medium
106 Construct Binary Tree from Inorder and Postorder Traversal Go Medium
108 Convert Sorted Array to Binary Search Tree Go Easy
112 Path Sum Go Easy
114 Flatten Binary Tree to Linked List Go Medium
117 Populating Next Right Pointers in Each Node II Go Medium
121 Best Time to Buy and Sell Stock Typescript, Go Easy
122 Best Time to Buy and Sell Stock II Go Medium
124 Binary Tree Maximum Path Sum Go Har
125 Valid Palindrome Typescript, Go Easy
127 Word Ladder Go Hard
128 Longest Consecutive Sequence Go Medium
129 Sum Root to Leaf Numbers Go Medium
130 Surrounded Regions Go Medium
133 Clone Graph Go Medium
134 Gas Station Go Medium
135 Candy Go Hard
136 Single Number Go Easy
138 Copy List with Random Pointer Go Medium
141 Linked List Cycle Typescript, Go Easy
146 LRU Cache Go Medium
148 Sort List Go Medium
150 Evaluate Reverse Polish Notation Go Medium
151 Reverse Words in a String Go Medium
155 Min Stack Typescript, Go Medium
162 Find Peak Element Go Medium
167 Two Sum II - Input Array Is Sorted Typescript, Go Medium
169 Majority Element Typescript Easy
173 Binary Search Tree Iterator Go Medium
187 Repeated DNA Sequences Go Medium
189 Rotate Array Go Medium
190 Reverse Bits Go Easy
191 Number of 1 Bits Go Easy
199 House Robber Go Medium
199 Binary Tree Right Side View Go Medium
200 Number of Islands Go Medium
202 Happy Number Go Easy
205 Isomorphic Strings Go Easy
206 Reverse Linked List Typescript, Go Medium
207 Course Schedule Go Medium
208 Implement Trie (Prefix Tree) Go Medium
209 Minimum Size Subarray Sum Go Medium
210 Course Schedule II Go Medium
211 Design Add and Search Words Data Structure Go Medium
212 Word Search II Go Hard
215 Kth Largest Element in an Array Typescript Medium
216 Combination Sum III Go Medium
217 Contains Duplicate Typescript, Go Easy
219 Contains Duplicate II Typescript, Go Easy
222 Count Complete Tree Nodes Go Easy
224 Basic Calculator Go Hard
225 Implement Stack using Queues Go Easy
226 Invert Binary Tree Typescript, Go Easy
228 Summary Ranges Go Easy
230 Kth Smallest Element in a BST Go Medium
235 Lowest Common Ancestor of a Binary Search Tree Typescript Medium
236 Lowest Common Ancestor of a Binary Tree Go Medium
238 Product of Array Except Self Go Medium
242 Valid Anagram Typescript, Go Easy
268 Missing Number Go Easy
274 H-Index Go Medium
283 Move Zeroes Go Easy
289 Game of Life Go Medium
290 Word Pattern Go Easy
304 Range Sum Query 2D - Immutable Typescript Medium
328 Odd Even Linked List Go Medium
334 Increasing Triplet Subsequence Go Medium
338 Counting Bits Go Easy
344 Reverse String Typescript Easy
347 Top K Frequent Elements Typescript Medium
371 Sum of Two Integers Go Medium
374 Guess Number Higher or Lower Go Easy
375 Reverse Vowels of a String Go Easy
380 Insert Delete GetRandom O(1) Go Medium
383 Ransom note Typescript, Go Easy
392 Is Subsequence Go Easy
394 Decode String Go Medium
399 Evaluate Division Go Medium
409 Longest Palindrome Typescript Easy
412 Fizz Buzz Go Easy
424 Longest Repeating Character Replacement Go Medium
433 Minimum Genetic Mutation Go Medium
435 Non-overlapping Intervals Go Medium
437 Path Sum III Go Medium
443 String Compression Go Medium
450 Delete Node in a BST Go Medium
452 Minimum Number of Arrows to Burst Balloons Go Medium
474 Ones and Zeroes Go Medium
485 Max Consecutive Ones Go Easy
530 Minimum Absolute Difference in BST Go Easy
547 Number of Provinces Go Medium
567 Permutation in String Typescript Medium
572 Subtree of Another Tree Typescript Easy
594 Longest Harmonious Subsequence Go Easy
605 Can Place Flowers Go Easy
637 Average of Levels in Binary Tree Go Easy
643 Maximum Average Subarray I Go Easy
645 Set Mismatch Go Easy
649 Dota2 Senate Go Medium
682 Baseball Game Typescript Easy
700 Search in a Binary Search Tree Go Easy
704 Binary Search Go Easy
705 Design HashSet Typescript Easy
706 Design HashMap Typescript Easy
714 Best Time to Buy and Sell Stock with Transaction Fee Go Medium
717 1-bit and 2-bit Characters Go Easy
724 Find Pivot Index Go Easy
735 Asteroid Collision Go Medium
739 Daily Temperatures Go Medium
746 Min Cost Climbing Stairs Go Easy
757 Set Intersection Size At Least Two Go Hard
790 Domino and Tromino Tiling Go Medium
841 Keys and Rooms Go Medium
872 Leaf-Similar Trees Go Easy
875 Koko Eating Bananas Typescript Medium
901 Online Stock Span Go Medium
909 Snakes and Ladders Go Medium
912 Sort an Array Typescript Medium
933 Number of Recent Calls Go Easy
994 Rotting Oranges Go Medium
1004 Max Consecutive Ones III Go Medium
1015 Smallest Integer Divisible by K Go Medium
1071 Greatest Common Divisor of Strings Go Easy
1072 Flip Columns For Maximum Number of Equal Rows Go Medium
1018 Binary Prefix Divisible By 5 Go Easy
1137 N-th Tribonacci Number Go Easy
1143 Longest Common Subsequence Go Medium
1161 Maximum Level Sum of a Binary Tree Go Medium
1207 Unique Number of Occurrences Go Medium
1268 Search Suggestions System Go Medium
1304 Find N Unique Integers Sum up to Zero Typescript Easy
1318 Minimum Flips to Make a OR b Equal to c Go Medium
1342 Number of Steps to Reduce a Number to Zero Go Easy
1372 Longest ZigZag Path in a Binary Tree Go Medium
1431 Kids With the Greatest Number of Candies Go Easy
1437 Check If All 1's Are at Least Length K Places Away Go Easy
1448 Count Good Nodes in Binary Tree Go Medium
1456 Maximum Number of Vowels in a Substring of Given Length Go Medium
1466 Reorder Routes to Make All Paths Lead to the City Zero C++ Medium
1470 Shuffle the Array Go Easy
1480 Running Sum of 1d Array Go Easy
1493 Longest Subarray of 1's After Deleting One Element Go Medium
1513 Number of Substrings With Only 1s Go Medium
1652 Defuse the Bomb Go Easy
1657 Determine if Two Strings Are Close Go Medium
1672 Richest Customer Wealth Go Easy
1679 Max Number of K-Sum Pairs Go Medium
1732 Find the Highest Altitude Go Easy
1763 Longest Nice Substring Go Easy
1768 Merge Strings Alternately Typescript, Go Easy
1792 Maximum Average Pass Ratio Typescript Medium
1863 Sum of All Subset XOR Totals Go Easy
1876 Substrings of Size Three with Distinct Characters Go Easy
1926 Nearest Exit from Entrance in Maze Go Medium
1930 Unique Length-3 Palindromic Subsequences Go Medium
1929 Concatenation of Array Typescript, Go Easy
1984 Minimum Difference Between Highest and Lowest of K Scores Go Easy
2095 Delete the Middle Node of a Linked List Go Medium
2130 Maximum Twin Sum of a Linked List Go Medium
2154 Keep Multiplying Found Values by Two Go Easy
2169 Count Operations to Obtain Zero Go, C++ Easy
2215 Find the Difference of Two Arrays Go Easy
2257 Count Unguarded Cells in the Grid Go Medium
2269 Find the K-Beauty of a Number Go Easy
2300 Successful Pairs of Spells and Potions Go Medium
2336 Smallest Number in Infinite Set Go Medium
2352 Equal Row and Column Pairs Go Medium
2379 Minimum Recolors to Get K Consecutive Black Blocks Go Easy
2390 Removing Stars From a String Go Medium
2435 Paths in Matrix Whose Sum Is Divisible by K Go Hard
2461 Maximum Sum of Distinct Subarrays With Length K Go Medium
2462 Total Cost to Hire K Workers Go Medium
2542 Maximum Subsequence Score Go Medium
2536 Increment Submatrices by One Go Medium
2620 Counter Javascript Easy
2621 Sleep Javascript Easy
2654 Minimum Number of Operations to Make All Array Elements Equal to 1 Go Medium
2703 Return Length of Arguments Passed Javascript Easy
2760 Longest Even Odd Subarray With Threshold Go Easy
2749 Minimum Operations to Make the Integer Zero Typescript Medium
2932 Maximum Strong Pair XOR I Go Easy
3025 Find the Number of Ways to Place People I Typescript Medium
3027 Find the Number of Ways to Place People II Typescript Hard
3190 Find Minimum Operations to Make All Elements Divisible by Three Go Easy
3228 Maximum Number of Operations to Move Ones to the End Go Medium
3234 Count the Number of Substrings With Dominant Ones Go Medium
3318 Find X-Sum of All K-Long Subarrays I Go Easy
3381 Maximum Subarray Sum With Length Divisible by K Go Medium
3516 Find Closest Person Typescript Easy
3542 Minimum Operations to Convert All Elements to Zero Go Medium

Directories

Path Synopsis
algorithms
3sum command
add-binary command
add-two-numbers command
binary-search command
candy command
climbing-stairs command
clone-graph command
combination-sum command
combinations command
counting-bits command
course-schedule command
decode-string command
defuse-the-bomb command
dota2-senate command
edit-distance command
fizz-buzz command
game-of-life command
gas-station command
group-anagrams command
h-index command
happy-number command
house-robber command
insert-interval command
is-subsequence command
jump-game command
jump-game-ii command
keys-and-rooms command
lru-cache command
merge-intervals command
min-stack command
missing-number command
move-zeroes command
ones-and-zeroes command
partition-list command
path-sum command
path-sum-iii command
plus-one command
ransom-note command
remove-element command
reverse-bits command
rotate-array command
rotate-image command
rotate-list command
rotting-oranges command
same-tree command
set-mismatch command
simplify-path command
single-number command
sort-list command
spiral-matrix command
sqrtx command
summary-ranges command
symmetric-tree command
two-sum-ii command
unique-paths command
valid-anagram command
valid-sudoku command
word-ladder command
word-pattern command
word-search-ii command

Jump to

Keyboard shortcuts

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