DSA
DSA Question List for Campus Placements (2026)
A practical DSA question list for campus placements — 50 problems by topic, company difficulty, and a study order that actually works.
Stop opening random LeetCode tabs. Here is a curated DSA question list for placements — grouped by topic, ordered by difficulty, with company guidance.
How to use this DSA question list
Solve the list topic-by-topic in the order below, 2–3 problems daily. After each problem, write the pattern name, approach, and time complexity in one line — this becomes your revision sheet.
Attempt each problem for 30–45 minutes before looking at the solution. If you cannot recall the pattern, re-solve a similar problem the next day from memory.
The list is ordered for interview coverage, not contest glory: service companies need the first three sections solid; product companies add the rest.
The companion guide at /blog/dsa-interview-questions-for-freshers explains the patterns behind these problems in detail.
Arrays and strings (must-do for every drive)
1. Two Sum — hash map, O(n)
2. Best time to buy and sell stock — single pass
3. Contains duplicate — set, O(n)
4. Product of array except self — prefix/suffix products
5. Maximum subarray (Kadane's) — O(n) DP
6. Merge intervals — sort + merge
7. Rotate array — reverse trick
8. Longest substring without repeating characters — sliding window
9. Valid palindrome — two pointers
10. Group anagrams — sorted key + hash map
Service-company OAs rarely go beyond this set. Practice these until they are 10-minute solves.
Hashing, sorting, and binary search
11. Top K frequent elements — heap or bucket sort
12. Valid anagram — frequency map
13. First missing positive — index marking
14. Kth largest element — quickselect or heap
15. Binary search in a sorted array — classic template
16. Find first and last position of target — two binary searches
17. Search in rotated sorted array — modified binary search
18. K closest points to origin — heap, O(n log k)
19. Sort colors (Dutch national flag) — three pointers
20. Meeting rooms — sort by start time, track end time
Linked lists, stacks, and queues
21. Reverse a linked list — iterative and recursive
22. Detect cycle in a linked list — Floyd's algorithm
23. Merge two sorted lists — two-pointer merge
24. Middle of the linked list — fast/slow pointers
25. Remove Nth node from end — two-pass or one-pass with offset
26. Valid parentheses — stack
27. Min stack — auxiliary stack, O(1) ops
28. Next greater element — monotonic stack
29. Implement queue using stacks — two-stack push/pop
30. LRU cache — hash map + doubly linked list (product-company favorite)
Trees, graphs, and dynamic programming
31. Binary tree inorder/preorder/postorder traversal — iterative versions included
32. Maximum depth of binary tree — BFS or recursion
33. Level order traversal — BFS with queue
34. Validate binary search tree — in-order check
35. Lowest common ancestor — recursive descent
36. Number of islands — BFS/DFS on grid
37. Clone graph — BFS with visited map
38. Course schedule (topological sort) — Kahn's algorithm
39. Climbing stairs — 1D DP
40. House robber — DP with two states
41. Longest common subsequence — 2D DP
42. Coin change — DP, min coins for amount
43. Word search — backtracking on grid
44. Rotting oranges — multi-source BFS
45. Dijkstra (network delay time) — heap-based shortest path
Company-wise priority for this list
TCS, Wipro, Cognizant, Accenture: problems 1–20 plus basic stack/queue questions. Easy-to-medium difficulty is the ceiling — see TCS PYQs at /pyqs.
Infosys Ninja: problems 1–30 with clean fundamentals. Infosys SP/DSE: add 31–45 with DP and graphs.
Amazon, Flipkart, Zomato, Google: the full list plus two more passes on 21–45. Product OAs mix medium and hard — see Amazon OA questions at /blog/amazon-oa-questions-2026.
Fintech (Goldman Sachs, JP Morgan, Temenos): 1–30 solidly, DP focus on 39–42, and SQL separately.
How to practice this list with Apply
Pair the list with company previous year questions at /pyqs so your practice matches real OA difficulty for your target drives.
After solving a topic, run a coding mock interview at /mock-interview with coding enabled — interviews test your narration, not just your solution.
Track weak patterns in one page: after 50 problems you should see exactly which topic deserves the next week.
Continue this workflow
Put the guide into practice with the most relevant tools and supporting resources.
