Coding Interview Solutions
317 videos • 306,510 views • by NeetCode
Coding interview problems explained through drawings and code.
1
How I Got Good at Coding Interviews
NeetCode
Download
2
Top 5 Dynamic Programming Patterns for Coding Interviews - For Beginners
NeetCode
Download
3
Top 5 Most Common Graph Algorithms for Coding Interviews
NeetCode
Download
4
Search a 2D Matrix - Leetcode 74 - Python
NeetCode
Download
5
Sort Colors - Quicksort Partition - Leetcode 75 - Python
NeetCode
Download
6
Design Min Stack - Amazon Interview Question - Leetcode 155 - Python
NeetCode
Download
7
Interleaving Strings - Dynamic Programming - Leetcode 97 - Python
NeetCode
Download
8
How to use Leetcode in 2020
NeetCode
Download
9
Python in 8 minutes (compared to Java)
NeetCode
Download
10
Two Sum - Leetcode 1 - HashMap - Python
NeetCode
Download
11
TWO SUM II - Amazon Coding Interview Question - Leetcode 167 - Python
NeetCode
Download
12
3Sum - Leetcode 15 - Python
NeetCode
Download
13
LRU Cache - Twitch Interview Question - Leetcode 146
NeetCode
Download
14
Maximum Subarray - Amazon Coding Interview Question - Leetcode 53 - Python
NeetCode
Download
15
House Robber - Leetcode 198 - Python Dynamic Programming
NeetCode
Download
16
Longest Palindromic Substring - Python - Leetcode 5
NeetCode
Download
17
Happy Number - Leetcode 202 - Python
NeetCode
Download
18
Container with Most Water - Leetcode 11 - Python
NeetCode
Download
19
LARGEST RECTANGLE IN HISTOGRAM - Leetcode 84 - Python
NeetCode
Download
20
Merge Two Sorted Lists - Leetcode 21 - Python
NeetCode
Download
21
Merge K Sorted Lists - Leetcode 23 - Python
NeetCode
Download
22
Reverse Linked List - Iterative AND Recursive - Leetcode 206 - Python
NeetCode
Download
23
Palindrome Linked List - Leetcode 234 - Python
NeetCode
Download
24
Add Two Numbers - Leetcode 2 - Python
NeetCode
Download
25
NUMBER OF ISLANDS - Leetcode 200 - Python
NeetCode
Download
26
Backtracking: Permutations - Leetcode 46 - Python
NeetCode
Download
27
Longest Substring Without Repeating Characters - Leetcode 3 - Python
NeetCode
Download
28
Search Insert Position - Binary Search - Leetcode 35 - Python
NeetCode
Download
29
Sliding Window: Best Time to Buy and Sell Stock - Leetcode 121 - Python
NeetCode
Download
30
Leetcode 128 - LONGEST CONSECUTIVE SEQUENCE
NeetCode
Download
31
Leetcode 1299 - REPLACE ELEMENTS WITH GREATEST ELEMENT ON RIGHT SIDE
NeetCode
Download
32
Leetcode 1466 - REORDER ROUTES TO MAKE ALL PATHS LEAD TO THE CITY ZERO
NeetCode
Download
33
Search in rotated sorted array - Leetcode 33 - Python
NeetCode
Download
34
Unique Binary Search Trees - Leetcode 96 - Python Dynamic Programming
NeetCode
Download
35
Sum Root to Leaf Numbers - Coding Interview Question - Leetcode 129
NeetCode
Download
36
Leetcode 1498 - Number of Subsequences That Satisfy the Given Sum Condition - Python
NeetCode
Download
37
Remove Linked List Elements - Leetcode 203
NeetCode
Download
38
Remove Nth Node from End of List - Oracle Interview Question - Leetcode 19
NeetCode
Download
39
Swap Nodes in Pairs - Apple Interview Question - Leetcode 24
NeetCode
Download
40
Learn SQL - SQL Interview Question - Second Highest Salary
NeetCode
Download
41
Netflix Interview Question - Top 3 Salaries - MySql
NeetCode
Download
42
Maximal Square - Top Down Memoization - Leetcode 221
NeetCode
Download
43
Triangle - Dynamic Programming made Easy - Leetcode 120
NeetCode
Download
44
Reverse Nodes in K-Group - Linked List - Leetcode 25
NeetCode
Download
45
Maximum Product Subarray - Dynamic Programming - Leetcode 152
NeetCode
Download
46
Sliding Window Maximum - Monotonic Queue - Leetcode 239
NeetCode
Download
47
Course Schedule - Graph Adjacency List - Leetcode 207
NeetCode
Download
48
Coin Change - Dynamic Programming Bottom Up - Leetcode 322
NeetCode
Download
49
Validate Binary Search Tree - Depth First Search - Leetcode 98
NeetCode
Download
50
Longest Increasing Subsequence - Dynamic Programming - Leetcode 300
NeetCode
Download
51
Group Anagrams - Categorize Strings by Count - Leetcode 49
NeetCode
Download
52
Set Matrix Zeroes - In-place - Leetcode 73
NeetCode
Download
53
Merge Intervals - Sorting - Leetcode 56
NeetCode
Download
54
Course Schedule II - Topological Sort - Leetcode 210
NeetCode
Download
55
Spiral Matrix - Microsoft Interview Question - Leetcode 54
NeetCode
Download
56
Median of Two Sorted Arrays - Binary Search - Leetcode 4
NeetCode
Download
57
Subsets - Backtracking - Leetcode 78
NeetCode
Download
58
Minimum Window Substring - Airbnb Interview Question - Leetcode 76
NeetCode
Download
59
Unique Paths - Dynamic Programming - Leetcode 62
NeetCode
Download
60
Rotate Image - Matrix - Leetcode 48
NeetCode
Download
61
Palindrome Partitioning - Backtracking - Leetcode 131
NeetCode
Download
62
Convert Sorted Array to Binary Search Tree - Leetcode 108 - Python
NeetCode
Download
63
Permutations II - Backtracking - Leetcode 47
NeetCode
Download
64
Sort List - Merge Sort - Leetcode 148
NeetCode
Download
65
Find Median from Data Stream - Heap & Priority Queue - Leetcode 295
NeetCode
Download
66
Invert Binary Tree - Depth First Search - Leetcode 226
NeetCode
Download
67
Binary Tree Right Side View - Breadth First Search - Leetcode 199
NeetCode
Download
68
Partition List - Linked List - Leetcode 86
NeetCode
Download
69
Clone Graph - Depth First Search - Leetcode 133
NeetCode
Download
70
Regular Expression Matching - Dynamic Programming Top-Down Memoization - Leetcode 10
NeetCode
Download
71
Merge Two Binary Trees - Leetcode 617
NeetCode
Download
72
First and Last Position of Element in Sorted Array - Binary Search - Leetcode 34
NeetCode
Download
73
Generate Parentheses - Stack - Leetcode 22
NeetCode
Download
74
Kth Smallest Element in a BST - Leetcode 230 - Python
NeetCode
Download
75
Letter Combinations of a Phone Number - Backtracking - Leetcode 17
NeetCode
Download
76
Asteroid Collision - Stack - Leetcode 735
NeetCode
Download
77
Diameter of a Binary Tree - Leetcode 543 - Python
NeetCode
Download
78
House Robber III - Tree - Leetcode 337
NeetCode
Download
79
Island Perimeter - Graph - Leetcode 463
NeetCode
Download
80
House Robber II - Dynamic Programming - Leetcode 213
NeetCode
Download
81
Is Subsequence - Leetcode 392
NeetCode
Download
82
Longest Common Subsequence - Dynamic Programming - Leetcode 1143
NeetCode
Download
83
Binary Tree Level Order Traversal - BFS - Leetcode 102
NeetCode
Download
84
Copy List with Random Pointer - Linked List - Leetcode 138
NeetCode
Download
85
Trapping Rain Water - Google Interview Question - Leetcode 42
NeetCode
Download
86
Jump Game - Greedy - Leetcode 55
NeetCode
Download
87
Encode and Decode TinyURL - Leetcode 535 - Python
NeetCode
Download
88
Rotate List - Linked List - Leetcode 61 - Python
NeetCode
Download
89
Simplify Path - Stack - Leetcode 71 - Python
NeetCode
Download
90
Jump Game II - Greedy - Leetcode 45 - Python
NeetCode
Download
91
Construct Binary Tree from Inorder and Preorder Traversal - Leetcode 105 - Python
NeetCode
Download
92
Valid Parentheses - Stack - Leetcode 20 - Python
NeetCode
Download
93
Single-Threaded CPU - Priority Queue - Leetcode 1834 - Python
NeetCode
Download
94
Word Search - Backtracking - Leetcode 79 - Python
NeetCode
Download
95
Add Binary - Leetcode 67 - Python
NeetCode
Download
96
Brick Wall - Leetcode 554 - Python
NeetCode
Download
97
Implement Trie (Prefix Tree) - Leetcode 208
NeetCode
Download
98
Frequency of the Most Frequent Element - Sliding Window - Leetcode 1838
NeetCode
Download
99
Network Delay Time - Dijkstra's algorithm - Leetcode 743
NeetCode
Download
100
Same Tree - Leetcode 100 - Python
NeetCode
Download
101
Gas Station - Greedy - Leetcode 134 - Python
NeetCode
Download
102
Seat Reservation Manager - Leetcode 1845 - Python
NeetCode
Download
103
Splitting a String Into Descending Consecutive Values - Leetcode 1849 - Python
NeetCode
Download
104
Plus One - Leetcode 66 - Python
NeetCode
Download
105
Minimum Interval to Include Each Query - Leetcode 1851 - Python
NeetCode
Download
106
Perfect Squares - Dynamic Programming - Leetcode 279 - Python
NeetCode
Download
107
First Missing Positive - Leetcode 41 - Python
NeetCode
Download
108
Edit Distance - Dynamic Programming - Leetcode 72 - Python
NeetCode
Download
109
Maximum Subarray Min-Product - Monotonic Increasing Stack - Leetcode 1856 - Python
NeetCode
Download
110
Distinct Subsequences - Dynamic Programming - Leetcode 115 - Python
NeetCode
Download
111
Best Time to Buy and Sell a Stock II - Leetcode 122 - Python
NeetCode
Download
112
Combination Sum IV - Dynamic Programming - Leetcode 377 - Python
NeetCode
Download
113
Burst Baloons - Dynamic Programming - Leetcode 312 - Python
NeetCode
Download
114
Top K Frequent Elements - Bucket Sort - Leetcode 347 - Python
NeetCode
Download
115
Koko Eating Bananas - Binary Search - Leetcode 875 - Python
NeetCode
Download
116
Number of Ways to Rearrange Sticks With K Sticks Visible - Dynamic Programming - Leetcode 1866
NeetCode
Download
117
Redundant Connection - Union Find - Leetcode 684 - Python
NeetCode
Download
118
Serialize and Deserialize Binary Tree - Preorder Traversal - Leetcode 297 - Python
NeetCode
Download
119
Partition Equal Subset Sum - Dynamic Programming - Leetcode 416 - Python
NeetCode
Download
120
Word Break - Dynamic Programming - Leetcode 139 - Python
NeetCode
Download
121
Hand of Straights - Leetcode 846 - Python
NeetCode
Download
122
Meeting Rooms - Leetcode 252 - Python
NeetCode
Download
123
Jump Game VII - Leetcode 1871 - Python
NeetCode
Download
124
Meeting Rooms II - Leetcode 253 - Python
NeetCode
Download
125
Lowest Common Ancestor of a Binary Search Tree - Leetcode 235 - Python
NeetCode
Download
126
Product of Array Except Self - Leetcode 238 - Python
NeetCode
Download
127
Longest Repeating Character Replacement - Leetcode 424 - Python
NeetCode
Download
128
Graph Valid Tree - Leetcode 261 - Python
NeetCode
Download
129
Pacific Atlantic Water Flow - Leetcode 417 - Python
NeetCode
Download
130
Palindromic Substrings - Leetcode 647 - Python
NeetCode
Download
131
Process Tasks Using Servers - Leetcode 1882 - Python
NeetCode
Download
132
Merge Sorted Array - Leetcode 88 - Python
NeetCode
Download
133
Design Add and Search Words Data Structure - Leetcode 211 - Python
NeetCode
Download
134
Combination Sum - Backtracking - Leetcode 39 - Python
NeetCode
Download
135
Binary Tree Maximum Path Sum - DFS - Leetcode 124 - Python
NeetCode
Download
136
Stickers to Spell Word - DP Memoization - Leetcode 691 - Python
NeetCode
Download
137
Climbing Stairs - Dynamic Programming - Leetcode 70 - Python
NeetCode
Download
138
Minimum Number of Flips to make Binary String Alternating - Sliding Window - Leetcode 1888 - Python
NeetCode
Download
139
Counting Bits - Dynamic Programming - Leetcode 338 - Python
NeetCode
Download
140
Word Search II - Backtracking Trie - Leetcode 212 - Python
NeetCode
Download
141
Number of Connected Components in an Undirected Graph - Union Find - Leetcode 323 - Python
NeetCode
Download
142
Alien Dictionary - Topological Sort - Leetcode 269 - Python
NeetCode
Download
143
Maximum Depth of Binary Tree - 3 Solutions - Leetcode 104 - Python
NeetCode
Download
144
Prim's Algorithm - Minimum Spanning Tree - Min Cost to Connect all Points - Leetcode 1584 - Python
NeetCode
Download
145
Merge Triplets to Form Target Triplet - Greedy - Leetcode 1899 - Python
NeetCode
Download
146
Maximum Number of Removable Characters - Binary Search - Leetcode 1898 - Python
NeetCode
Download
147
Find the Duplicate Number - Floyd's Cycle Detection - Leetcode 287 - Python
NeetCode
Download
148
N-Queens - Backtracking - Leetcode 51 - Python
NeetCode
Download
149
Subarray Sum Equals K - Prefix Sums - Leetcode 560 - Python
NeetCode
Download
150
Minimum Number of Days to Eat N Oranges - Dynamic Programming - Leetcode 1553 - Python
NeetCode
Download
151
Linked List Cycle - Floyd's Tortoise and Hare - Leetcode 141 - Python
NeetCode
Download
152
Daily Temperatures - Monotonic Stack - Leetcode 739 - Python
NeetCode
Download
153
Count Sub Islands - DFS - Leetcode 1905 - Python
NeetCode
Download
154
Swim in Rising Water - Dijkstra's Algorithm - Leetcode 778 - Python
NeetCode
Download
155
Walls and Gates - Multi-Source BFS - Leetcode 286 - Python
NeetCode
Download
156
Word Ladder - Breadth First Search - Leetcode 127 - Python
NeetCode
Download
157
Maximum Alternating Subsequence Sum - Dynamic Programming - Leetcode 1911 - Python
NeetCode
Download
158
Microsoft's Most Asked Question 2021 - Count Good Nodes in a Binary Tree - Leetcode 1448 - Python
NeetCode
Download
159
Verifying an Alien Dictionary - Leetcode 953 - Python
NeetCode
Download
160
GOOGLE MOST ASKED QUESTION 2021 - Maximum Points you can Obtain from Cards - Leetcode 1423 - Python
NeetCode
Download
161
Linkedin Interview Question - Reorder List - Leetcode 143 - Python
NeetCode
Download
162
K Closest Points to Origin - Heap / Priority Queue - Leetcode 973 - Python
NeetCode
Download
163
Paint House - Dynamic Programming - Leetcode 256 - Python
NeetCode
Download
164
Eliminate Maximum Number of Monsters - Leetcode 1921 - Weekly Contest 248 - Python
NeetCode
Download
165
Valid Sudoku - Amazon Interview Question - Leetcode 36 - Python
NeetCode
Download
166
Decode Ways - Dynamic Programming - Leetcode 91 - Python
NeetCode
Download
167
Multiply Strings - Leetcode 43 - Python
NeetCode
Download
168
Reverse Bits - Binary - Leetcode 190 - Python
NeetCode
Download
169
Unique Length-3 Palindromic Subsequences - Leetcode 1930 - Python
NeetCode
Download
170
Rotate Array - Leetcode 189 - Python
NeetCode
Download
171
Combination Sum II - Backtracking - Leetcode 40 - Python
NeetCode
Download
172
Encode and Decode Strings - Leetcode 271 - Python
NeetCode
Download
173
Minimum Path Sum - Dynamic Programming - Leetcode 64 - Python
NeetCode
Download
174
Insert Interval - Leetcode 57 - Python
NeetCode
Download
175
Robot Bounded in Circle - Math & Geometry - Leetcode 1041 - Python
NeetCode
Download
176
Missing Number - Blind 75 - Leetcode 268 - Python
NeetCode
Download
177
Decode String - Leetcode 394 - Python
NeetCode
Download
178
Last Stone Weight - Priority Queue - Leetcode 1046 - Python
NeetCode
Download
179
Check if Move is Legal - Biweekly Leetcode Contest - 1958 - Python
NeetCode
Download
180
Minimum Number of Swaps to Make String Balanced - Leetcode 1963 Weekly Contest - Python
NeetCode
Download
181
Pascal's Triangle - Leetcode 118 - Python
NeetCode
Download
182
Flip Equivalent Binary Trees - Leetcode 951 - Python
NeetCode
Download
183
Array With Elements Not Equal to Average of Neighbors - Leetcode 1968 - Python
NeetCode
Download
184
Surrounded Regions - Graph - Leetcode 130 - Python
NeetCode
Download
185
Reverse Integer - Bit Manipulation - Leetcode 7 - Python
NeetCode
Download
186
Palindrome Number - Leetcode 9 - Python
NeetCode
Download
187
Pow(x, n) - X to the power of N - Leetcode 50 - Python
NeetCode
Download
188
ZigZag Conversion - Leetcode 6 - Python
NeetCode
Download
189
Find Unique Binary String - Leetcode Weekly Contest 1980 - Python
NeetCode
Download
190
Coin Change 2 - Dynamic Programming Unbounded Knapsack - Leetcode 518 - Python
NeetCode
Download
191
Balanced Binary Tree - Leetcode 110 - Python
NeetCode
Download
192
Kth Largest Element in an Array - Quick Select - Leetcode 215 - Python
NeetCode
Download
193
Roman to Integer - Leetcode 13 - Python
NeetCode
Download
194
Minimum Difference Between Highest and Lowest of K Scores - Leetcode Weekly Contest - 1984 Python
NeetCode
Download
195
Find the Kth Largest Integer in the Array - Leetcode Weekly Contest - 1985 Python
NeetCode
Download
196
Combinations - Leetcode 77 - Python
NeetCode
Download
197
Bellman-Ford - Cheapest Flights within K Stops - Leetcode 787 - Python
NeetCode
Download
198
Longest Common Prefix - Leetcode 14 - Python
NeetCode
Download
199
Operations on Tree - Leetcode Biweekly Contest - 1993 - Python
NeetCode
Download
200
Remove Duplicates from Sorted Array - Leetcode 26 - Python
NeetCode
Download