Top 100 DSA Interview Questions
Anonymous User
109749

This list was provided by @Ujjawal_278 on this page, but the links to the questions were not included. I added the links using ChatGPT.

Array

ProblemLeetCode LinkDifficulty Level
Check if pair with the given Sum exists in ArrayLinkEasy
Best Time to Buy and Sell StockLinkEasy
Find duplicatesLinkMedium
Product of Array Except SelfLinkMedium
Maximum SubarrayLinkEasy
Maximum Product SubarrayLinkMedium
Find Minimum in Rotated Sorted ArrayLinkMedium
Search in Rotated Sorted ArrayLinkMedium
3 SumLinkMedium
Container With Most WaterLinkMedium
Find the Factorial of a large numberLinkMedium
Trapping Rain WaterLinkHard
Chocolate Distribution ProblemLinkMedium
Insert IntervalLinkHard
Merge IntervalsLinkMedium
Non-overlapping IntervalsLinkMedium
Set Matrix ZeroesLinkMedium
Spiral MatrixLinkMedium

Linked List

ProblemLeetCode LinkDifficulty Level
Reverse a Linked ListLinkEasy
Detect Cycle in a Linked ListLinkMedium
Merge Two Sorted ListsLinkEasy
Merge K Sorted ListsLinkHard
Remove Nth Node From End Of ListLinkMedium
Reorder ListLinkMedium
Add 1 to a number represented as linked listLinkMedium
Find the middle of a given linked listLinkEasy
Delete last occurrence of an item from linked listLinkEasy

String

ProblemLeetCode LinkDifficulty Level
Longest Substring Without Repeating CharactersLinkMedium
Longest Repeating Character ReplacementLinkMedium
Smallest window in a String containing all characters of other StringLinkHard
Check whether two Strings are anagram of each otherLinkEasy
Print all anagrams togetherLinkMedium

Stack and Queue

ProblemLeetCode LinkDifficulty Level
Check if given Parentheses expression is balanced or notLinkEasy
Delete middle element of a stackLinkMedium

Tree and Graph

ProblemLeetCode LinkDifficulty Level
Invert/Flip Binary TreeLinkEasy
Binary Tree Maximum Path SumLinkHard
Binary Tree Level Order TraversalLinkMedium
Serialize and Deserialize Binary TreeLinkHard
Subtree of Another TreeLinkEasy
Construct Binary Tree from Preorder and Inorder TraversalLinkMedium
Validate Binary Search TreeLinkMedium
Kth Smallest Element in a BSTLinkMedium
Lowest Common Ancestor of BSTLinkEasy
Implement Trie (Prefix Tree)LinkMedium
Add and Search WordLinkMedium

Dynamic Programming

ProblemLeetCode LinkDifficulty Level
Coin ChangeLinkMedium
0/1 Knapsack ProblemLinkMedium
Longest Increasing SubsequenceLinkMedium
Longest Common SubsequenceLinkMedium

| Word Break Problem | Link | Medium |

Graph

ProblemLeetCode LinkDifficulty Level
Detect Cycle in a Directed GraphLinkMedium
Bridges in a graphLinkHard
Check whether a given graph is Bipartite or notLinkMedium
Strongly Connected ComponentsLinkHard
Topological SortingLinkMedium

Miscellaneous

ProblemLeetCode LinkDifficulty Level
Sentence PalindromeLinkEasy
Palindromic SubstringsLinkMedium
Longest Common PrefixLinkEasy
Print Right View of a Binary TreeLinkMedium
Find the first circular tour that visits all petrol pumpsLinkMedium
Length of the longest valid substringLinkHard
Find the XOR of all subsets of a setLinkMedium
Detect Cycle in a Directed GraphLinkMedium
Bridges in a graphLinkMedium
Check whether a given graph is Bipartite or notLinkMedium
Find size of the largest region in Boolean MatrixLinkMedium
Flood fill AlgorithmLinkMedium
Strongly Connected ComponentsLinkMedium
Topological SortingLinkMedium
Count ways to reach the n’th stairLinkEasy
Coin ChangeLinkMedium
0/1 Knapsack ProblemLinkMedium
Longest Increasing SubsequenceLinkMedium
Longest Common SubsequenceLinkMedium
Word Break ProblemLinkMedium
Dice ThrowLinkMedium
Egg Dropping PuzzleLinkHard
Matrix Chain MultiplicationLinkMedium
Combination SumLinkMedium
Subset Sum ProblemLinkMedium
Find maximum possible stolen value from housesLinkMedium
Count Possible Decodings of a given Digit SequenceLinkMedium
Unique paths in a Grid with ObstaclesLinkMedium
Jump GameLinkMedium
Cutting a RodLinkMedium
Maximum Product CuttingLinkMedium
Count number of ways to cover a distanceLinkEasy
Number of 1 BitsLinkEasy
Counting BitsLinkMedium
Missing NumberLinkEasy
Reverse BitsLinkEasy
Find XOR of all subsets of a setLinkMedium
Comments (15)