Data Structures and Algorithms (DSA)  

Which DSA Problems Are Repeatedly Asked in Interviews?

📌 Introduction

Every year, thousands of students prepare for coding interviews and placements. While there are thousands of problems online, the truth is:

👉 A handful of DSA problems keep getting repeated across companies like TCS, Infosys, Wipro, Amazon, Microsoft, and Google.

If you master these repeated interview problems, you cover 60–70% of coding test patterns.

🧩 Most Repeated DSA Problems

Here’s a curated list of frequently asked DSA problems, categorized by topic.

🔢 Arrays

  1. Two Sum Problem (Find indices of two numbers that add up to a target).

  2. Kadane’s Algorithm (Maximum subarray sum).

  3. Rotate Array (Left/Right rotation).

  4. Find Missing Number in an array from 1 to n.

  5. Majority Element (appearing more than n/2 times).

💡 Common in Infosys, TCS, Accenture, Wipro interviews.

🔡 Strings

  1. Check Palindrome String.

  2. Anagram Check (two strings contain same characters).

  3. Longest Common Prefix among given strings.

  4. Valid Parentheses (balanced brackets).

  5. Substring Search (implement strstr/IndexOf).

💡 Frequent in service-based companies and entry-level rounds.

🔗 Linked List

  1. Reverse a Linked List (Iterative + Recursive).

  2. Detect a Cycle (Floyd’s Cycle Detection).

  3. Merge Two Sorted Linked Lists.

  4. Find Middle Element of Linked List.

  5. Remove Nth Node from End.

💡 Infosys, Tech Mahindra, and Amazon often ask these.

📚 Stack & Queue

  1. Implement Stack/Queue using arrays or linked list.

  2. Next Greater Element.

  3. Evaluate Postfix/Prefix Expression.

  4. LRU Cache Implementation.

  5. Sliding Window Maximum.

💡 Popular in Flipkart, Amazon, and Microsoft interviews.

🌳 Trees

  1. Binary Tree Traversals (Inorder, Preorder, Postorder).

  2. Height of a Tree.

  3. Lowest Common Ancestor (LCA).

  4. Diameter of a Tree.

  5. Check if a Tree is Balanced.

💡 Asked in Amazon, Adobe, and Microsoft interviews.

🌐 Graphs

  1. BFS & DFS Traversals.

  2. Detect Cycle in Graph.

  3. Shortest Path (Dijkstra’s Algorithm).

  4. Minimum Spanning Tree (Prim/Kruskal).

  5. Topological Sorting.

💡 Google, Microsoft, and Amazon love graph problems.

🧮 Dynamic Programming (DP)

  1. Fibonacci Series (Memoization + Tabulation).

  2. Longest Common Subsequence (LCS).

  3. Longest Increasing Subsequence (LIS).

  4. 0/1 Knapsack Problem.

  5. Coin Change Problem.

💡 DP separates average coders from top-tier candidates in FAANG-level interviews.

📊 Company-Wise Problem Focus

Company TypeFrequently Asked ProblemsDifficulty
Service-based (TCS, Infosys, Wipro, Cognizant)Arrays (Kadane, Missing Number), Strings (Palindrome, Anagram), Linked List BasicsEasy – Medium
Mid-tier (Capgemini, Tech Mahindra, Accenture)Arrays + Hashing, Linked Lists, Stacks & QueuesMedium
Product-based (Amazon, Microsoft, Google, Adobe, Flipkart)Trees (LCA, Diameter), Graphs (BFS, Shortest Path), DP (Knapsack, LCS)Medium – Hard

✅ Summary

The most repeated DSA problems in interviews are:

  • Arrays: Kadane’s Algorithm, Two Sum, Missing Number.

  • Strings: Palindrome, Anagram, Valid Parentheses.

  • Linked List: Reverse, Detect Cycle, Merge Lists.

  • Stacks/Queues: Next Greater Element, LRU Cache.

  • Trees/Graphs: Traversals, LCA, BFS/DFS, Shortest Path.

  • DP: Fibonacci, LCS, Knapsack.

💡 If you practice 200–250 problems covering these patterns, you’ll be ready for most interview coding rounds.

🔎 FAQ

Q1. How many repeated DSA problems should I focus on before placements?
👉 Around 100–150 core problems are enough.

Q2. Can I crack TCS/Infosys with only arrays and strings?
👉 Yes, for service-based companies, those two topics cover most coding tests.

Q3. Do I need to learn Dynamic Programming for Wipro/Accenture?
👉 Not mandatory. Focus more on Arrays, Strings, Linked Lists.

Q4. Which problems are must-do for Amazon interviews?
👉 LRU Cache, Linked List Cycle Detection, Binary Tree LCA, DP (LCS, Knapsack).

Q5. Where can I find a list of all repeated problems?
👉 GeeksforGeeks “Top 100 DSA Problems” and LeetCode’s “Top Interview Questions” section.