Interview Questions

# Question Tags Companies
0001 Two Sum hash-map
0002 Add Two Numbers linked-list, dummy-list-head
0005 Longest Palindromic Substring palindrome
0009 Palindrome Number palindrome, math
0011 Container With Most Water two-pointers
0015 3Sum k-sum
0019 Remove Nth Node From End of List linked-list, two-pointers, trailing-pointer
0020 Valid Parentheses stack, parentheses
0021 Merge Two Sorted Lists linked-list
0026 Remove Duplicates from Sorted Array array-shift, two-pointers
0027 Remove Element two-pointers
0033 Search in Rotated Sorted Array binary-search
0034 Find First and Last Position of Element in Sorted Array binary-search
0035 Search Insert Position binary-search
0039 Combination Sum backtracking
0049 Group Anagrams hash-map, anagram
0056 Merge Intervals interval-merge
0057 Insert Interval interval-merge
0061 Rotate List linked-list, list-to-ring
0064 Minimum Path Sum dp-2d, dp
0070 Climbing Stairs dp
0071 Simplify Path stack
0074 Search a 2D Matrix binary-search
0079 Word Search backtracking-with-matrix
0088 Merge Sorted Array pointers
0093 Restore IP Addresses backtracking
0094 Binary Tree Inorder Traversal binary-tree-traversal-inorder
0098 Validate Binary Search Tree bst, recursion
0100 Same Tree binary-tree-traversal, recursion
0101 Symmetric Tree binary-tree-traversal
0104 Maximum Depth of Binary Tree binary-tree-traversal
0106 Construct Binary Tree from Inorder and Postorder Traversal binary-tree-manipulation
0108 Convert Sorted Array to Binary Search Tree bst
0111 Minimum Depth of Binary Tree bfs, binary-tree
0112 Path Sum binary-tree, recursion
0124 Binary Tree Maximum Path Sum recursion, binary-tree
0125 Valid Palindrome palindrome
0129 Sum Root to Leaf Numbers recursion, binary-tree
0133 Clone Graph dfs, bfs
0136 Single Number math
0138 Copy List with Random Pointer linked-list, dummy-list-head, recursion
0141 Linked List Cycle linked-list, fast-slow-pointer
0144 Binary Tree Preorder Traversal binary-tree-traversal-preorder
0145 Binary Tree Postorder Traversal binary-tree-traversal-postorder
0146 LRU Cache lru-cache
0150 Evaluate Reverse Polish Notation stack
0160 Intersection of Two Linked Lists linked-list
0167 Two Sum II - Input Array Is Sorted k-sum
0169 Majority Element counting, boyer-moore-voting-algorithm
0173 Binary Search Tree Iterator bst
0190 Reverse Bits bits
0191 Number of 1 Bits bits
0198 House Robber dp
0200 Number of Islands dfs-bfs-grid
0202 Happy Number set, fast-slow-pointer
0206 Reverse Linked List linked-list
0208 Implement Trie (Prefix Tree) trie-prefix-tree
0211 Design Add and Search Words Data Structure trie-prefix-tree, dfs, recursion
0212 Word Search II backtracking-with-matrix, trie-prefix-tree
0215 Kth Largest Element in an Array k-most-points, priority-queue, bubble-sort, quick-sort, counting-sort
0217 Contains Duplicate set
0221 Maximal Square dp-2d
0222 Count Complete Tree Nodes binary-tree
0223 Rectangle Area math
0224 Basic Calculator calculator, parentheses
0226 Invert Binary Tree binary-tree-manipulation
0227 Basic Calculator II calculator
0232 Implement Queue using Stacks stack, queue
0234 Palindrome Linked List palindrome-center-expansion, fast-slow-pointer
0236 Lowest Common Ancestor of a Binary Tree least-common-ancestor
0242 Valid Anagram string
0263 Ugly Number math
0268 Missing Number math
0278 First Bad Version binary-search
0283 Move Zeroes array-shift, two-pointers
0289 Game of Life simulation, state-changes
0297 Serialize and Deserialize Binary Tree binary-tree
0322 Coin Change knapsack-unbounded, dp-2d
0328 Odd Even Linked List two-pointers
0334 Increasing Triplet Subsequence array
0338 Counting Bits bits, dp
0344 Reverse String string
0345 Reverse Vowels of a String two-pointers, string
0347 Top K Frequent Elements k-most-points, bucket-sort, hash-map
0374 Guess Number Higher or Lower binary-search
0380 Insert Delete GetRandom O(1) hash-map, array
0406 Queue Reconstruction by Height sort
0413 Arithmetic Slices dp
0415 Add Strings string
0416 Partition Equal Subset Sum knapsack-1-0
0435 Non-overlapping Intervals interval-merge, greedy
0451 Sort Characters By Frequency counting
0452 Minimum Number of Arrows to Burst Balloons interval-merge
0460 LFU Cache lfu-cache
0462 Minimum Moves to Equal Array Elements II math
0494 Target Sum backtracking, dp, knapsack-1-0
0495 Teemo Attacking greedy, interval-merge, simulation
0501 Find Mode in Binary Search Tree bst, binary-tree-traversal-inorder, dfs
0509 Fibonacci Number recursion
0543 Diameter of Binary Tree binary-tree-traversal
0572 Subtree of Another Tree tree-serialization, binary-tree
0605 Can Place Flowers array
0606 Construct String from Binary Tree recursion, binary-tree
0621 Task Scheduler greedy, math
0623 Add One Row to Tree binary-tree-manipulation, dfs
0647 Palindromic Substrings palindrome, string
0653 Two Sum IV - Input is a BST k-sum, dfs
0665 Non-decreasing Array monotonic-stack
0682 Baseball Game simulation
0695 Max Area of Island dfs-bfs-grid
0698 Partition to K Equal Sum Subsets subset-sum, backtracking
0700 Search in a Binary Search Tree bst
0704 Binary Search binary-search
0740 Delete and Earn dp
0746 Min Cost Climbing Stairs dp
0771 Jewels and Stones set
0799 Champagne Tower simulation
0872 Leaf-Similar Trees binary-tree-traversal
0876 Middle of the Linked List fast-slow-pointer
0881 Boats to Save People two-pointers, greedy
0897 Increasing Order Search Tree bst
0901 Online Stock Span monotonic-stack
0931 Minimum Falling Path Sum dp-2d
0938 Range Sum of BST bst, recursion
0946 Validate Stack Sequences stack, simulation, greedy
0953 Verifying an Alien Dictionary hash-map, topological-sorting
0958 Check Completeness of a Binary Tree binary-tree, bfs
0983 Minimum Cost For Tickets dp, knapsack-unbounded
0991 Broken Calculator reverse-thinking, puzzle
1020 Number of Enclaves dfs-bfs-grid
1046 Last Stone Weight priority-queue
1094 Car Pooling interval-overlap
1143 Longest Common Subsequence dp-2d
1207 Unique Number of Occurrences counting
1249 Minimum Remove to Make Valid Parentheses stack, parentheses
1254 Number of Closed Islands dfs-bfs-grid
1339 Maximum Product of Splitted Binary Tree binary-tree
1423 Maximum Points You Can Obtain from Cards sliding-window, array
1431 Kids With the Greatest Number of Candies simulation
1466 Reorder Routes to Make All Paths Lead to the City Zero dfs, bfs
1470 Shuffle the Array array
1472 Design Browser History stack
1544 Make The String Great stack
1578 Minimum Time to Make Rope Colorful pointers, array
1647 Minimum Deletions to Make Character Frequencies Unique hash-map-count
1657 Determine if Two Strings Are Close counting
1662 Check If Two String Arrays are Equivalent string
1673 Find the Most Competitive Subsequence monotonic-stack
1704 Determine if String Halves Are Alike string
1710 Maximum Units on a Truck greedy
1757 Recyclable and Low Fat Products sql
1768 Merge Strings Alternately pointers
2095 Delete the Middle Node of a Linked List fast-slow-pointer
2131 Longest Palindrome by Concatenating Two Letter Words palindrome, string
2182 Construct String With Repeat Limit priority-queue
2283 Check if Number Has Equal Digit Count and Digit Value hash-map-count
2284 Sender With Largest Word Count hash-map-count
2287 Rearrange Characters to Make Target String hash-map-count
2293 Min Max Game recursion, simulation
2294 Partition Array Such That Maximum Difference Is K array
2326 Spiral Matrix IV spiral-matrix
2348 Number of Zero-Filled Subarrays array, math
2389 Longest Subsequence With Limited Sum subset-sum, binary-search
2390 Removing Stars From a String stack
2404 Most Frequent Even Element hash-map-count
2405 Optimal Partition of String string, greedy
2413 Smallest Even Multiple math
2414 Length of the Longest Alphabetical Continuous Substring pointers, stack
2418 Sort the People hash-map
2423 Remove Letter To Equalize Frequency hash-map-count
2427 Number of Common Factors math
2432 The Employee That Worked on the Longest Task array
2433 Find The Original Array of Prefix Xor math
2437 Number of Valid Clock Times simulation
2441 Largest Positive Integer That Exists With Its Negative two-pointers
2446 Determine if Two Events Have Conflict interval
2451 Odd String Difference array, counting
2455 Average Value of Even Numbers That Are Divisible by Three math
2456 Most Popular Video Creator hash-map-count
2492 Minimum Score of a Path Between Two Cities dfs, bfs, union-find
2924 Find Champion II graph
3110 Score of a String string
3264 Final Array State After K Multiplication Operations I priority-queue
2460 Apply Operations to an Array two-pointers