Interview Problems

Practice coding problems with detailed solutions and explanations

Ranking Problem Difficulty Companies Topics Frequency
#1
Two Sum
Easy
Google Amazon Apple Microsoft +6 more
Array Tabla Hash
95%
#2
Valid Parentheses
Easy
Google Amazon Microsoft Meta +6 more
Cadena Pila
89%
#3
Best Time to Buy and Sell Stock
Easy
Amazon Google Apple Meta +6 more
Array Programación Dinámica
87%
#4
Merge Two Sorted Lists
Easy
Amazon Google Microsoft Apple +6 more
Lista Enlazada Recursión
84%
#5
Valid Anagram
Easy
Amazon Google Meta Apple +6 more
Tabla Hash Cadena +1 more
82%
#6
Binary Search
Easy
Google Amazon Meta Apple +6 more
Array Búsqueda Binaria
80%
#7
Reverse Linked List
Easy
Amazon Google Meta Apple +6 more
Lista Enlazada Recursión
78%
#8
Contains Duplicate
Easy
Amazon Google Apple Meta +6 more
Array Tabla Hash +1 more
76%
#9
Maximum Subarray
Medium
Amazon Google Meta Apple +6 more
Array Divide y Vencerás +1 more
74%
#10
3Sum
Medium
Amazon Google Meta Apple +6 more
Array Dos Punteros +1 more
72%
#11
Climbing Stairs
Easy
Amazon Google Apple Microsoft +6 more
Matemáticas Programación Dinámica +1 more
70%
#12
Longest Palindromic Substring
Medium
Amazon Google Meta Apple +6 more
Cadena Programación Dinámica
68%
#13
Product of Array Except Self
Medium
Amazon Google Meta Apple +6 more
Array Suma de Prefijos
66%
#14
Group Anagrams
Medium
Amazon Google Meta Apple +6 more
Array Tabla Hash +2 more
64%
#15
Top K Frequent Elements
Medium
Amazon Google Meta Apple +6 more
Array Tabla Hash +6 more
62%
#16
Palindromic Substrings
Medium
Google Microsoft Amazon Meta +4 more
Cadena Programación Dinámica
68%
#17
Course Schedule
Medium
Google Amazon Meta Microsoft +5 more
Búsqueda en Profundidad Búsqueda en Amplitud +2 more
75%
#18
House Robber
Medium
Google Amazon Microsoft Meta +5 more
Array Programación Dinámica
82%
#19
Meeting Rooms II
Medium
Google Amazon Microsoft Meta +6 more
Array Dos Punteros +3 more
88%
#20
Implement Trie (Prefix Tree)
Medium
Google Amazon Microsoft Meta +6 more
Tabla Hash Cadena +2 more
79%
#21
Lowest Common Ancestor of a Binary Tree
Medium
Google Amazon Microsoft Meta +6 more
Árbol Búsqueda en Profundidad +1 more
85%
#22
Word Search
Medium
Google Amazon Microsoft Meta +6 more
Array Backtracking +1 more
77%
#23
Subarray Sum Equals K
Medium
Google Amazon Meta Microsoft +6 more
Array Tabla Hash +1 more
81%
#24
Spiral Matrix
Medium
Google Amazon Microsoft Meta +6 more
Array Matriz +1 more
73%
#25
Decode Ways
Medium
Google Amazon Meta Microsoft +6 more
Cadena Programación Dinámica
69%
#26
Find Minimum in Rotated Sorted Array
Medium
Google Amazon Microsoft Meta +6 more
Array Búsqueda Binaria
84%
#27
Kth Largest Element in an Array
Medium
Google Amazon Meta Microsoft +6 more
Array Divide y Vencerás +3 more
91%
#28
Combination Sum
Medium
Google Amazon Meta Microsoft +6 more
Array Backtracking
78%
#29
Number of Islands
Medium
Google Amazon Meta Microsoft +6 more
Array Búsqueda en Profundidad +3 more
89%
#30
Longest Substring Without Repeating Characters
Medium
Google Amazon Meta Microsoft +6 more
Tabla Hash Cadena +1 more
93%
#31
Container With Most Water
Medium
Google Amazon Meta Microsoft +6 more
Array Dos Punteros +1 more
86%
#32
Merge Intervals
Medium
Google Amazon Meta Microsoft +6 more
Array Ordenación
87%
#33
Rotate Array
Medium
Google Amazon Microsoft Meta +6 more
Array Matemáticas +1 more
72%
#34
Search in Rotated Sorted Array
Medium
Google Amazon Meta Microsoft +6 more
Array Búsqueda Binaria
88%
#35
Permutations
Medium
Google Amazon Meta Microsoft +6 more
Array Backtracking
79%
#36
Jump Game
Medium
Google Amazon Meta Microsoft +6 more
Array Programación Dinámica +1 more
83%
#37
Unique Paths
Medium
Google Amazon Meta Microsoft +6 more
Matemáticas Programación Dinámica +1 more
76%
#38
Set Matrix Zeroes
Medium
Google Amazon Meta Microsoft +6 more
Array Tabla Hash +1 more
71%
#39
Minimum Window Substring
Hard
Google Amazon Meta Microsoft +6 more
Tabla Hash Cadena +1 more
85%
#40
Coin Change
Medium
Google Amazon Meta Microsoft +6 more
Array Programación Dinámica +1 more
90%
#41
Word Break
Medium
Google Amazon Meta Microsoft +6 more
Tabla Hash Cadena +2 more
83%
#42
Longest Common Subsequence
Medium
Google Amazon Meta Microsoft +6 more
String Dynamic Programming
81%
#43
Edit Distance
Medium
Google Amazon Meta Microsoft +6 more
String Dynamic Programming
77%
#44
Trapping Rain Water
Hard
Google Amazon Meta Microsoft +6 more
Array Two Pointers +2 more
92%
#45
Clone Graph
Medium
Google Amazon Meta Microsoft +6 more
Hash Table Depth-First Search +2 more
78%
#46
Pacific Atlantic Water Flow
Medium
Google Amazon Meta Microsoft +6 more
Array Depth-First Search +2 more
71%
#47
Alien Dictionary
Hard
Google Amazon Meta Microsoft +6 more
Array String +4 more
74%
#48
Graph Valid Tree
Medium
Google Amazon Meta Microsoft +6 more
Depth-First Search Breadth-First Search +2 more
69%
#49
Number of Connected Components
Medium
Google Amazon Meta Microsoft +6 more
Depth-First Search Breadth-First Search +2 more
76%
#50
Longest Increasing Subsequence
Medium
Google Amazon Meta Microsoft +6 more
Array Binary Search +1 more
84%
#51
Maximum Subarray
Easy
Google Amazon Microsoft Meta +6 more
Array Divide and Conquer +1 more
92%
#52
Climbing Stairs
Easy
Google Amazon Microsoft Meta +6 more
Math Dynamic Programming +1 more
88%
#53
Best Time to Buy and Sell Stock
Easy
Google Amazon Microsoft Meta +6 more
Array Dynamic Programming
90%
#54
Maximum Depth of Binary Tree
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
85%
#55
Same Tree
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
82%
#56
Symmetric Tree
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
80%
#57
Path Sum
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
78%
#58
Minimum Depth of Binary Tree
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
76%
#59
Balanced Binary Tree
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +1 more
74%
#60
Convert Sorted Array to Binary Search Tree
Easy
Google Amazon Microsoft Meta +6 more
Array Divide and Conquer +3 more
72%
#61
Merge Two Sorted Lists
Easy
Google Amazon Microsoft Meta +6 more
Linked List Recursion
70%
#62
Remove Duplicates from Sorted List
Easy
Google Amazon Microsoft Meta +6 more
Linked List
68%
#63
Linked List Cycle
Easy
Google Amazon Microsoft Meta +6 more
Hash Table Linked List +1 more
66%
#64
Binary Tree Inorder Traversal
Easy
Google Amazon Microsoft Meta +6 more
Stack Tree +2 more
64%
#65
Symmetric Tree
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
62%
#66
Binary Tree Level Order Traversal
Medium
Google Amazon Microsoft Meta +6 more
Tree Breadth-First Search +1 more
60%
#67
Binary Tree Zigzag Level Order Traversal
Medium
Google Amazon Microsoft Meta +6 more
Tree Breadth-First Search +1 more
58%
#68
Construct Binary Tree from Preorder and Inorder Traversal
Medium
Google Amazon Microsoft Meta +6 more
Array Hash Table +3 more
56%
#69
Populating Next Right Pointers in Each Node
Medium
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
54%
#70
Sum of Left Leaves
Easy
Google Amazon Microsoft Meta +6 more
Tree Depth-First Search +2 more
52%
#71
Find All Anagrams in a String
Medium
Google Amazon Microsoft Meta +6 more
Hash Table String +1 more
50%
#72
Permutation in String
Medium
Google Amazon Microsoft Meta +6 more
Hash Table Two Pointers +2 more
48%
#73
Longest Substring Without Repeating Characters
Medium
Google Amazon Microsoft Meta +6 more
Hash Table String +1 more
46%
#74
Minimum Window Substring
Hard
Google Amazon Microsoft Meta +6 more
Hash Table String +1 more
44%
#75
Sliding Window Maximum
Hard
Google Amazon Microsoft Meta +6 more
Array Queue +3 more
42%
#76
Single Number
Easy
Google Amazon Microsoft Apple +1 more
Array Bit Manipulation
85%
#77
Number of 1 Bits
Easy
Apple Microsoft Amazon Google
Bit Manipulation Divide and Conquer
70%
#78
Counting Bits
Easy
Amazon Apple Google Meta
Dynamic Programming Bit Manipulation
68%
#79
Sum of Two Integers
Medium
Amazon Microsoft Apple
Math Bit Manipulation
60%
#80
Gas Station
Medium
Amazon Meta Google Microsoft
Array Greedy
75%
#81
Partition Labels
Medium
Amazon Meta Google
Hash Table String +2 more
72%
#82
Task Scheduler
Medium
Google Meta Amazon Microsoft
Array Hash Table +4 more
80%
#83
Jump Game II
Medium
Amazon Google Meta Microsoft
Array Dynamic Programming +1 more
78%
#84
Hand of Straights
Medium
Google Amazon Meta
Array Hash Table +2 more
65%
#85
Min Stack
Medium
Amazon Google Microsoft Meta
Stack Design
88%
#86
Daily Temperatures
Medium
Google Amazon Meta Microsoft
Array Stack +1 more
82%
#87
Largest Rectangle in Histogram
Hard
Amazon Google Meta Microsoft
Array Stack +1 more
75%
#88
Merge K Sorted Lists
Hard
Amazon Google Microsoft Meta +1 more
Linked List Divide and Conquer +2 more
90%
#89
Find Median from Data Stream
Hard
Google Amazon Meta Microsoft
Two Pointers Design +3 more
85%
#90
K Closest Points to Origin
Medium
Amazon Meta Google Microsoft
Array Math +5 more
83%
#91
Insert Interval
Medium
Google Amazon Meta Microsoft
Array
88%
#92
Non-overlapping Intervals
Medium
Amazon Microsoft Google
Array Dynamic Programming +2 more
78%
#93
Meeting Rooms
Easy
Google Amazon Meta
Array Sorting
70%
#94
Design Add and Search Words Data Structure
Medium
Amazon Meta Google Microsoft
String Depth-First Search +2 more
75%
#95
Word Search II
Hard
Google Amazon Microsoft Meta
Array String +3 more
80%