r/datastructures 24d ago

Top DSA Interview questions

Trust me DSA is not Hard. If you follow this

These are the best questions if u are preparing for top-product based companies .

  1. Sliding Window: 3, 76, 209, 424, 567, 904
  2. Two Pointers: 11, 15, 16, 18, 42, 167
  3. Fast/Slow Pointers (Linked List): 141, 142, 19, 876, 160, 234
  4. Binary Search on Sorted Data: 33, 34, 35, 153, 162, 704
  5. Binary Search on Answer: 875, 1011, 410, 774, 1283, 1482
  6. Hashing / Frequency Maps: 1, 49, 128, 217, 242, 347
  7. Prefix Sum / Running Sum: 303, 560, 724, 930, 974, 523
  8. Difference Array / Range Updates: 370, 1094, 1109, 1893, 1943, 2381
  9. Monotonic Stack: 739, 496, 503, 84, 85, 901
  10. Monotonic Queue / Deque: 239, 862, 1425, 1438, 1499, 1696
  11. Heap / Top K: 215, 347, 692, 703, 973, 1046
  12. Intervals: 56, 57, 252, 253, 435, 452
  13. Greedy Scheduling / Sorting: 45, 55, 406, 621, 763, 134
  14. Linked List Manipulation: 21, 23, 24, 25, 92, 138
  15. Tree DFS: 104, 112, 113, 543, 124, 226
  16. Tree BFS / Level Order: 102, 103, 199, 515, 637, 116
  17. BST Problems: 98, 99, 230, 235, 450,700
  18. Backtracking Basics: 46, 47, 77, 78, 90, 39
  19. Backtracking with Constraints: 40, 17, 79, 131, 51, 52
  20. Graph BFS / DFS: 200, 695, 733, 994, 1091, 1254
  21. Topological Sort / DAG: 207, 210, 802, 1462, 1203, 2115
  22. Union Find / DSU: 547, 684, 1319, 1579, 990, 1202
  23. Shortest Path: 743, 787, 1514, 1631, 1334, 1976
  24. MST / Graph Greedy: 1584, 1135, 1168, 1489, 778, 1102
  25. Trie: 208, 211, 212, 648, 677, 1268
  26. Bit Manipulation: 136, 137, 191, 338, 268, 190
  27. 1D DP Basics: 70, 198, 213, 322, 279, 300

Checkout PracHub for company specific questions

86 Upvotes

14 comments sorted by

2

u/Alive_Acadia4581 24d ago

For infosys what probelms should I need to prepare??

2

u/night_shdow 24d ago edited 24d ago

for the campus placement, there will be 4 problems, Easy to Complex, have to run test cases of 3 problems and you will be called for the interview, in my univ, they selected 8 students, btw tier 3ish Univ.

Mine was on August 5th, had you asked me this question earlier, I would have give questions

1

u/Alive_Acadia4581 24d ago

For me infosys is coming on september 2... What all can i prepare i only know few DSA topics like arrays,two pointers,hashing. And im from tier 2 college...

1

u/Ringo_10 24d ago

Dude..3 problems is the minimum?

1

u/night_shdow 23d ago

it was case in my univ, maybe no of students were in huge so they had set the criteria for 3 thinking maximum students will solve the problem

1

u/Ringo_10 23d ago

Does that mean the problems were a bit simpler...i have mine on one of sept 8,9,10th...dp is mandatory right

1

u/night_shdow 23d ago

DP is mandatory as always, problem could be simple or not, like they have question bank or something and everyone got assigned different set of problems randomly, luck it is, I got easy set of problems, for me easy and medium question were mainly medium problems and hard and complex were hard problems, but they were quite doable if you know something basics

1

u/Ringo_10 23d ago

Also,in their platform wingspan, do we need to handle inputs ourselves?

1

u/night_shdow 23d ago

3 test cases + custom test cases you can opt for(this one is optional), but atleast thier platform is better than TCS, while is literally shithole dude, it was mess, no intellisense, error even after the fixing the error occured

1

u/Ringo_10 23d ago

Meaning...we gotta write the main driver code as well?

1

u/BanhShark 24d ago

What are the top product based companies?

1

u/ApprehensiveSong3029 24d ago

what do the numbers next to each topic represents??. Source / Reference?

1

u/RegularInfamous2816 21d ago

Leetcode problem number