LeetCode Solution
Python
TypeScript
Java
C++
More
Rust
Swift
Kotlin
PHP
TypeScript
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 (atoi)
9.
Palindrome Number
10.
Regular Expression Matching
11.
Container With Most Water
13.
Roman to Integer
14.
Longest Common Prefix
15.
3Sum
16.
3Sum Closest
17.
Letter Combinations of a Phone Number
19.
Remove Nth Node From End of List
20.
Valid Parentheses
21.
Merge Two Sorted Lists
22.
Generate Parentheses
23.
Merge k Sorted Lists
26.
Remove Duplicates from Sorted Array
27.
Remove Element
28.
Find the Index of the First Occurrence in a String
31.
Next Permutation
33.
Search in Rotated Sorted Array
34.
Find First and Last Position of Element in Sorted Array
35.
Search Insert Position
36.
Valid Sudoku
39.
Combination Sum
40.
Combination Sum II
41.
First Missing Positive
42.
Trapping Rain Water
45.
Jump Game II
46.
Permutations
47.
Permutations II
48.
Rotate Image
49.
Group Anagrams
50.
Pow(x, n)
51.
N-Queens
53.
Maximum Subarray
54.
Spiral Matrix
55.
Jump Game
56.
Merge Intervals
57.
Insert Interval
61.
Rotate List
62.
Unique Paths
63.
Unique Paths II
64.
Minimum Path Sum
66.
Plus One
67.
Add Binary
70.
Climbing Stairs
71.
Simplify Path
72.
Edit Distance
73.
Set Matrix Zeroes
74.
Search a 2D Matrix
75.
Sort Colors
76.
Minimum Window Substring
78.
Subsets
79.
Word Search
84.
Largest Rectangle in Histogram
88.
Merge Sorted Array
90.
Subsets II
91.
Decode Ways
94.
Binary Tree Inorder Traversal
98.
Validate Binary Search Tree
100.
Same Tree
101.
Symmetric Tree
102.
Binary Tree Level Order Traversal
103.
Binary Tree Zigzag Level Order Traversal
104.
Maximum Depth of Binary Tree
105.
Construct Binary Tree from Preorder and Inorder Traversal
110.
Balanced Binary Tree
114.
Flatten Binary Tree to Linked List
121.
Best Time to Buy and Sell Stock
122.
Best Time to Buy and Sell Stock II
124.
Binary Tree Maximum Path Sum
125.
Valid Palindrome
127.
Word Ladder
128.
Longest Consecutive Sequence
130.
Surrounded Regions
131.
Palindrome Partitioning
133.
Clone Graph
134.
Gas Station
136.
Single Number
138.
Copy List with Random Pointer
139.
Word Break
141.
Linked List Cycle
142.
Linked List Cycle II
143.
Reorder List
144.
Binary Tree Preorder Traversal
146.
LRU Cache
150.
Evaluate Reverse Polish Notation
152.
Maximum Product Subarray
153.
Find Minimum in Rotated Sorted Array
155.
Min Stack
160.
Intersection of Two Linked Lists
162.
Find Peak Element
167.
Two Sum II - Input Array Is Sorted
169.
Majority Element
190.
Reverse Bits
191.
Number of 1 Bits
198.
House Robber
199.
Binary Tree Right Side View
200.
Number of Islands
202.
Happy Number
206.
Reverse Linked List
207.
Course Schedule
208.
Implement Trie (Prefix Tree)
210.
Course Schedule II
211.
Design Add and Search Words Data Structure
212.
Word Search II
213.
House Robber II
215.
Kth Largest Element in an Array
217.
Contains Duplicate
221.
Maximal Square
224.
Basic Calculator
226.
Invert Binary Tree
227.
Basic Calculator II
230.
Kth Smallest Element in a BST
232.
Implement Queue using Stacks
234.
Palindrome Linked List
235.
Lowest Common Ancestor of a Binary Search Tree
236.
Lowest Common Ancestor of a Binary Tree
238.
Product of Array Except Self
239.
Sliding Window Maximum
242.
Valid Anagram
252.
Meeting Rooms
253.
Meeting Rooms II
261.
Graph Valid Tree
268.
Missing Number
269.
Alien Dictionary
271.
Encode and Decode Strings
278.
First Bad Version
283.
Move Zeroes
287.
Find the Duplicate Number
295.
Find Median from Data Stream
297.
Serialize and Deserialize Binary Tree
300.
Longest Increasing Subsequence
309.
Best Time to Buy and Sell Stock with Cooldown
322.
Coin Change
323.
Number of Connected Components in an Undirected Graph
328.
Odd Even Linked List
338.
Counting Bits
344.
Reverse String
347.
Top K Frequent Elements
371.
Sum of Two Integers
377.
Combination Sum IV
383.
Ransom Note
409.
Longest Palindrome
412.
Fizz Buzz
416.
Partition Equal Subset Sum
417.
Pacific Atlantic Water Flow
424.
Longest Repeating Character Replacement
435.
Non-overlapping Intervals
438.
Find All Anagrams in a String
448.
Find All Numbers Disappeared in an Array
518.
Coin Change II
542.
01 Matrix
543.
Diameter of Binary Tree
560.
Subarray Sum Equals K
567.
Permutation in String
572.
Subtree of Another Tree
621.
Task Scheduler
647.
Palindromic Substrings
680.
Valid Palindrome II
695.
Max Area of Island
703.
Kth Largest Element in a Stream
704.
Binary Search
721.
Accounts Merge
733.
Flood Fill
739.
Daily Temperatures
743.
Network Delay Time
763.
Partition Labels
787.
Cheapest Flights Within K Stops
846.
Hand of Straights
853.
Car Fleet
875.
Koko Eating Bananas
938.
Range Sum of BST
973.
K Closest Points to Origin
981.
Time Based Key-Value Store
994.
Rotting Oranges
1046.
Last Stone Weight
1143.
Longest Common Subsequence
1584.
Min Cost to Connect All Points
1929.
Concatenation of Array
2128.
Remove All Ones With Row and Column Flips
LeetCode
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 (atoi)
9.
Palindrome Number
10.
Regular Expression Matching
11.
Container With Most Water
13.
Roman to Integer
14.
Longest Common Prefix
15.
3Sum
16.
3Sum Closest
17.
Letter Combinations of a Phone Number
19.
Remove Nth Node From End of List
20.
Valid Parentheses
21.
Merge Two Sorted Lists
22.
Generate Parentheses
23.
Merge k Sorted Lists
26.
Remove Duplicates from Sorted Array
27.
Remove Element
28.
Find the Index of the First Occurrence in a String
31.
Next Permutation
33.
Search in Rotated Sorted Array
34.
Find First and Last Position of Element in Sorted Array
35.
Search Insert Position
36.
Valid Sudoku
39.
Combination Sum
40.
Combination Sum II
41.
First Missing Positive
42.
Trapping Rain Water
45.
Jump Game II
46.
Permutations
47.
Permutations II
48.
Rotate Image
49.
Group Anagrams
50.
Pow(x, n)
51.
N-Queens
53.
Maximum Subarray
54.
Spiral Matrix
55.
Jump Game
56.
Merge Intervals
57.
Insert Interval
61.
Rotate List
62.
Unique Paths
63.
Unique Paths II
64.
Minimum Path Sum
66.
Plus One
67.
Add Binary
70.
Climbing Stairs
71.
Simplify Path
72.
Edit Distance
73.
Set Matrix Zeroes
74.
Search a 2D Matrix
75.
Sort Colors
76.
Minimum Window Substring
78.
Subsets
79.
Word Search
84.
Largest Rectangle in Histogram
88.
Merge Sorted Array
90.
Subsets II
91.
Decode Ways
94.
Binary Tree Inorder Traversal
98.
Validate Binary Search Tree
100.
Same Tree
101.
Symmetric Tree
102.
Binary Tree Level Order Traversal
103.
Binary Tree Zigzag Level Order Traversal
104.
Maximum Depth of Binary Tree
105.
Construct Binary Tree from Preorder and Inorder Traversal
110.
Balanced Binary Tree
114.
Flatten Binary Tree to Linked List
121.
Best Time to Buy and Sell Stock
122.
Best Time to Buy and Sell Stock II
124.
Binary Tree Maximum Path Sum
125.
Valid Palindrome
127.
Word Ladder
128.
Longest Consecutive Sequence
130.
Surrounded Regions
131.
Palindrome Partitioning
133.
Clone Graph
134.
Gas Station
136.
Single Number
138.
Copy List with Random Pointer
139.
Word Break
141.
Linked List Cycle
142.
Linked List Cycle II
143.
Reorder List
144.
Binary Tree Preorder Traversal
146.
LRU Cache
150.
Evaluate Reverse Polish Notation
152.
Maximum Product Subarray
153.
Find Minimum in Rotated Sorted Array
155.
Min Stack
160.
Intersection of Two Linked Lists
162.
Find Peak Element
167.
Two Sum II - Input Array Is Sorted
169.
Majority Element
190.
Reverse Bits
191.
Number of 1 Bits
198.
House Robber
199.
Binary Tree Right Side View
200.
Number of Islands
202.
Happy Number
206.
Reverse Linked List
207.
Course Schedule
208.
Implement Trie (Prefix Tree)
210.
Course Schedule II
211.
Design Add and Search Words Data Structure
212.
Word Search II
213.
House Robber II
215.
Kth Largest Element in an Array
217.
Contains Duplicate
221.
Maximal Square
224.
Basic Calculator
226.
Invert Binary Tree
227.
Basic Calculator II
230.
Kth Smallest Element in a BST
232.
Implement Queue using Stacks
234.
Palindrome Linked List
235.
Lowest Common Ancestor of a Binary Search Tree
236.
Lowest Common Ancestor of a Binary Tree
238.
Product of Array Except Self
239.
Sliding Window Maximum
242.
Valid Anagram
252.
Meeting Rooms
253.
Meeting Rooms II
261.
Graph Valid Tree
268.
Missing Number
269.
Alien Dictionary
271.
Encode and Decode Strings
278.
First Bad Version
283.
Move Zeroes
287.
Find the Duplicate Number
295.
Find Median from Data Stream
297.
Serialize and Deserialize Binary Tree
300.
Longest Increasing Subsequence
309.
Best Time to Buy and Sell Stock with Cooldown
322.
Coin Change
323.
Number of Connected Components in an Undirected Graph
328.
Odd Even Linked List
338.
Counting Bits
344.
Reverse String
347.
Top K Frequent Elements
371.
Sum of Two Integers
377.
Combination Sum IV
383.
Ransom Note
409.
Longest Palindrome
412.
Fizz Buzz
416.
Partition Equal Subset Sum
417.
Pacific Atlantic Water Flow
424.
Longest Repeating Character Replacement
435.
Non-overlapping Intervals
438.
Find All Anagrams in a String
448.
Find All Numbers Disappeared in an Array
518.
Coin Change II
542.
01 Matrix
543.
Diameter of Binary Tree
560.
Subarray Sum Equals K
567.
Permutation in String
572.
Subtree of Another Tree
621.
Task Scheduler
647.
Palindromic Substrings
680.
Valid Palindrome II
695.
Max Area of Island
703.
Kth Largest Element in a Stream
704.
Binary Search
721.
Accounts Merge
733.
Flood Fill
739.
Daily Temperatures
743.
Network Delay Time
763.
Partition Labels
787.
Cheapest Flights Within K Stops
846.
Hand of Straights
853.
Car Fleet
875.
Koko Eating Bananas
938.
Range Sum of BST
973.
K Closest Points to Origin
981.
Time Based Key-Value Store
994.
Rotting Oranges
1046.
Last Stone Weight
1143.
Longest Common Subsequence
1584.
Min Cost to Connect All Points
1929.
Concatenation of Array
2128.
Remove All Ones With Row and Column Flips