Open In App

Top 100 Data Structure and Algorithms DSA Interview Questions Topic-wise

Last Updated : 23 Sep, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

DSA has been one of the most popular go-to topics for any interview, be it college placements, software developer roles, or any other technical roles for freshers and experienced to land a decent job. If you are among them, you already know that it is not easy to find the best DSA interview questions among the vast pool of available problems. So here we are, with the Top 100 most asked DSA interview questions to help you sail through your technical rounds.

For a quick and focused revision, check out our GfG-160
Master Complete DSA from basic to advanced with DSA-360°

Array

  1. Pair with the given Sum
  2. Best Time to Buy and Sell Stock
  3. Product of Array Except Self
  4. Maximum Subarray
  5. Container With Most Water
  6. Factorial of a large number
  7. Trapping Rain Water
  8. Insert and Merge Intervals
  9. Merge Intervals

For more, please refer Top 50 Array Interview Questions

Matrix

  1. Spiral Matrix
  2. Transpose of a matrix
  3. Word Search

For more, please refer Top 50 Matrix Interview Questions

String

  1. Longest Substring Without Repeating
  2. Longest Repeating Character Replacement
  3. Smallest window containing all characters
  4. Print all anagrams together
  5. Sentence Palindrome
  6. Longest Palindromic Substring
  7. Palindromic Substrings

For more, please refer Top 50 String Interview Questions

Searching and Sorting

  1. Search in Rotated Sorted Array
  2. Peak Element
  3. K-th element of two sorted arrays
  4. Allocate Minimum Pages
  5. Kth Missing Positive Number
  6. Sort 0s, 1s and 2s
  7. Count Inversions
  8. Merge two sorted arrays without extra space
  9. Chocolate Distribution Problem

Hashing

  1. Print all pairs with given sum
  2. Longest Subsequence with Adjacent Difference of 0 or 1
  3. Longest Consecutive Sequence
  4. Count Subarrays with given XOR

Linked List

  1. Reverse a Linked List
  2. Detect Cycle in a Linked List
  3. Merge Two Sorted Lists
  4. Merge K Sorted Lists
  5. Remove Nth Node From End Of List
  6. Reorder List
  7. Add 1 to a number represented as linked list
  8. Clone a Linked List

For more, please refer Top 50 Linked List Interview Questions

Stack, Queue & Deque

  1. Infix to Postfix expression
  2. Next Greater Element
  3. Largest Area in a Histogram
  4. Delete middle element of a stack
  5. Length of the longest valid substring
  6. Sum of Max of Subarrays
  7. Next Greater Element in a Circular Array
  8. Longest Bounded-Difference Subarray
  9. K Sized Subarray Maximum

For more, please refer Stack Interview Questions, Queue Interview Questions, and Deque Interview Questions

Tree

  1. Maximum Depth of Binary Tree
  2. Check for Mirror Trees
  3. Invert/Flip Binary Tree
  4. Binary Tree Maximum Path Sum
  5. Binary Tree Level Order Traversal
  6. Serialize and Deserialize Binary Tree
  7. Subtree of Another Tree
  8. Construct Binary Tree from Preorder and Inorder Traversal
  9. Validate Binary Search Tree
  10. Kth Smallest Element in a BST
  11. Lowest Common Ancestor of BST
  12. Implement Trie (Prefix Tree)

For more, please refer Top 50 Tree Interview Questions

Heap

  1. Top K Frequent Elements
  2. Find Median from Data Stream
  3. Largest triplet product in a stream
  4. Connect n Ropes

For more, please refer Top 50 Heap Interview Questions

Graph

  1. Clone Graph
  2. Course Schedule
  3. Pacific Atlantic Water Flow
  4. Number of Islands
  5. Snake and Ladder Problem
  6. Detect Cycle in a Directed Graph
  7. Bridges in a Graph
  8. Check for Bipartite
  9. Largest region in Boolean Matrix
  10. Flood fill Algorithm
  11. Strongly Connected Components
  12. Topological Sorting

For more, please refer Top 50 Graph Interview Questions

Dynamic Programming & Greedy

  1. Count ways to reach the n’th stair
  2. Coin Change
  3. 0/1 Knapsack Problem
  4. Longest Increasing Subsequence
  5. Longest Common Subsequence
  6. Word Break Problem
  7. Dice Throw 
  8. Egg Dropping Puzzle
  9. Matrix Chain Multiplication
  10. Combination Sum
  11. Subset Sum Problem
  12. Maximum possible stolen value
  13. Count Possible Decodings of a given Digit Sequence
  14. Unique paths in a Grid with Obstacles
  15. Jump Game
  16. Cutting a Rod
  17. Maximum Product Cutting
  18. Count number of ways to cover a distance
  19. Connect n ropes with minimum cost
  20. Largest Number in one Swap

For more, please refer Top DP Interview Questions & Top Greedy Interview Questions

Bit Manipulations

  1. Counting Bits
  2. Missing Number
  3. Find XOR of all subsets of a set

For more, please refer Top Bit Manipulation Interview Questions


Explore