Open In App

Top 75 DSA Questions

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

In this post, we present a list of the top 75 data structures and algorithms (DSA) coding questions to help you prepare for a thorough revision for interviews at leading tech companies like Meta, Google, Amazon, Apple, Microsoft, etc. This list helps you to cover an extensive variety of DSA Coding questions ensuring you don't miss any key concepts that could appear in the interview.

Arrays

  1. Next Permutation
  2. Stock Buy and Sell - Multiple Transactions Allowed
  3. Minimize the Heights
  4. First Missing Positive

String

  1. String to Integer - Your Own atoi()
  2. Anagram Check
  3. First Non-Repeating Character
  4. Min Chars to Add for Palindrome

Sorting

  1. Sort 0s, 1s and 2s
  2. Count Inversions
  3. Insert and Merge Interval
  4. Merge two sorted arrays without extra space
  5. Chocolate Distribution Problem

Searching

  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

Matrix

  1. Spiral Traversal
  2. Search in a sorted matrix
  3. Set Matrix Zeroes

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

Two Pointer Technique

  1. Triplet Sum
  2. Longest Substring With Distinct Characters
  3. Trapping Rain Water

Prefix Sum

  1. Longest Subarray with Equal No of 0s and 1s
  2. Product of Array except Self
  3. Find Starting Petrol Pump for Circular Tour

Linked List

  1. Reverse a linked list in groups
  2. Segregate even and odd nodes in a Linked List
  3. Clone a Linked List
  4. Remove Loop in Linked List
  5. LRU Cache

Backtracking

  1. Permutations of a String
  2. N Queens

Tree

  1. Construct Tree from Inorder and Preorder
  2. Boundary Traversal
  3. Count all K Sum Paths in Binary Tree
  4. Fixing Two nodes of BST
  5. LCA in BST
  6. Largest BST in a Tree

Heap

  1. Merge K Sorted Lists
  2. Median of a Stream
  3. Top K Frequent Elements in an Array

Stack

  1. Longest Valid Parentheses
  2. Largest Area in a Histogram
  3. Maximum and Minimum of every window size
  4. Min Stack

Queue and Deque

  1. Sliding Window Maximum
  2. Maximum score with jumps of at most length K

Dynamic Programming

  1. Subset Sum Problem
  2. Longest Increasing Subsequence
  3. Longest Palindromic Subsequence
  4. Count Palindromic Substring
  5. Minimum Jumps to Reach End
  6. Coin Change - Minimum Coins
  7. Stock Buy and Sell - Max K Transactions Allowed
  8. House Robber II
  9. Word Break
  10. Count Possible Decodings of a Digit Sequence

Greedy

  1. Minimum Platforms
  2. Job Sequencing
  3. Maximize Partitions with Unique Characters

Graph

  1. Islands in a Graph
  2. Minimum time to Rot Oranges
  3. Cycle in an Undirected Graph
  4. Cycle in a Directed Graph
  5. Topological Sorting
  6. Minimum Cost to connect all points
  7. City with Fewest Neighbors Within Threshold Distance
  8. Email Account Merging

Trie

  1. Insert and Search in a Trie

Article Tags :

Similar Reads