0% found this document useful (0 votes)
8 views5 pages

DSA Interview Questions Topic Wise

The document lists frequently asked interview questions categorized by data structures and algorithms, including topics such as Arrays, Strings, Linked Lists, Binary Trees, and more. Each category contains specific problems or concepts that candidates may encounter in interviews. This comprehensive guide serves as a resource for preparing for data structure and algorithm interviews.

Uploaded by

09941677846
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

DSA Interview Questions Topic Wise

The document lists frequently asked interview questions categorized by data structures and algorithms, including topics such as Arrays, Strings, Linked Lists, Binary Trees, and more. Each category contains specific problems or concepts that candidates may encounter in interviews. This comprehensive guide serves as a resource for preparing for data structure and algorithm interviews.

Uploaded by

09941677846
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Frequently Asked DSA Interview Questions (Topic-wise)

1. Arrays

- Two Sum
- Best Time to Buy and Sell Stock
- Majority Element (Moore's Voting)
- Kadane's Algorithm (Max Subarray)
- Merge Intervals
- Move Zeroes
- Trapping Rain Water
- Rotate Array
- Product of Array Except Self
- Subarray Sum Equals K

2. Strings

- Longest Substring Without Repeating Characters


- Valid Anagram
- Longest Palindromic Substring
- Group Anagrams
- Minimum Window Substring
- Implement strStr() (KMP Optional)
- Roman to Integer
- Zigzag Conversion
- Decode Ways
- Multiply Strings

3. Linked List

- Reverse Linked List


- Detect Cycle in Linked List
- Merge Two Sorted Lists
- Remove N-th Node from End
- Add Two Numbers (Linked List)
- Palindrome Linked List
- Intersection of Two Linked Lists
- Copy List with Random Pointer
- Rotate List
- Flatten a Multilevel Linked List

4. Binary Trees

- Inorder / Preorder / Postorder Traversal (Recursive & Iterative)


- Level Order Traversal
- Diameter of Binary Tree
- Balanced Binary Tree
- Symmetric Tree
- Lowest Common Ancestor
- Serialize and Deserialize Binary Tree
- Zigzag Level Order Traversal
- Flatten Binary Tree to Linked List
- Construct Tree from Inorder and Preorder

5. Binary Search Trees (BST)

- Validate BST
- Insert/Delete in BST
- Kth Smallest Element in BST
- LCA in BST
- Convert Sorted Array to BST
- Range Sum of BST
- BST Iterator
- Recover BST (2 nodes swapped)

6. Math

- Sieve of Eratosthenes
- GCD using Euclidean Algorithm
- Reverse Integer
- Palindrome Number
- Pow(x, n) - Fast Exponentiation
- Excel Column Title / Number
- Count Primes
- Missing and Repeating Number
- Divide Two Integers (without /, %, *)
- Add Binary Strings

7. Recursion & Backtracking

- Subsets / Subsets II
- Permutations / Permutations II
- N-Queens
- Sudoku Solver
- Combination Sum I / II
- Word Search
- Generate Parentheses
- Rat in a Maze
- Palindrome Partitioning
- Letter Combinations of Phone Number

8. Stacks & Queues

- Valid Parentheses
- Min Stack
- Daily Temperatures
- Next Greater Element
- Evaluate Reverse Polish Notation
- Implement Queue using Stack
- Sliding Window Maximum
- LRU Cache
- Asteroid Collision
- Stack Span Problem

9. Heaps / Priority Queue

- Kth Largest Element


- Merge K Sorted Lists
- Find Median from Data Stream
- Top K Frequent Elements
- Reorganize String
- Sliding Window Median
- Min Cost to Connect Ropes
- Sort Characters by Frequency
- Task Scheduler
- K Closest Points to Origin

10. Graphs

- BFS / DFS of Graph


- Number of Islands
- Clone Graph
- Detect Cycle (Undirected / Directed)
- Topological Sort
- Course Schedule
- Word Ladder I & II
- Dijkstra's Algorithm
- Union Find (DSU)
- Kruskal / Prim's MST

11. Dynamic Programming

- Fibonacci Number (Memoization)


- Climbing Stairs
- Longest Increasing Subsequence
- 0/1 Knapsack
- Longest Common Subsequence / Substring
- Coin Change (Min Coins & No. of Ways)
- Edit Distance
- Partition Equal Subset Sum
- Palindromic Substrings
- Burst Balloons

12. Tries / String Algorithms

- Implement Trie
- Word Search II
- Longest Prefix Matching
- Suffix Trie / Array (Advanced)
- Rabin-Karp
- KMP Algorithm
- Aho-Corasick (Advanced)
- Auto-complete System
- Replace Words in Sentence
- Word Break I / II

13. Bit Manipulation

- Single Number / Single Number II


- Count Set Bits
- Power of Two / Power of Four
- XOR Queries
- Subsets using Bits
- Sum of Two Integers (without +)
- Bitwise AND of Numbers Range
- Maximum XOR of Two Numbers
- Flip Bits to Convert A to B
- Divide Two Integers

You might also like