Guides for your first job
DSA prep that fitsin four weeks, not four months.
Six topics, not five hundred problems. Arrays, hashing, two pointers, stacks, BFS/DFS, basic DP — how to talk through brute force to optimal out loud, and a realistic schedule.
- Six topicsthat cover most fresher rounds
- Talk it throughbrute force to optimal
- 4-weekrealistic schedule
Arrays
Traversal, in-place manipulation, prefix sums, sliding window. The most common building block for everything else on this list.
Hashing
Hash maps and sets for O(1) lookups — turns a huge share of "find pairs" and "count occurrences" problems from brute-force O(n²) into O(n).
Two pointers
Sorted-array and string problems where moving two indices inward or across avoids nested loops — a small pattern that shows up constantly.
Stacks
Matching brackets, next-greater-element, monotonic stack problems — a compact topic with high interview-frequency for its size.
BFS / DFS
Graph and tree traversal — the base for most "connected components", "shortest path in unweighted graph" and "explore all paths" questions.
Basic DP
Just the foundational patterns — 1D DP (climbing stairs, house robber style), simple 2D DP (grid paths). Skip advanced DP for a first-round prep pass.
Explaining brute force to optimal, out loud
This is the part most self-study misses — solving a problem silently doesn\'t train the skill an interview actually tests.
Even if it's obviously slow, say it: "the simplest approach would be to check every pair, which is O(n²)". This shows you can reason from first principles, and it's a normal, expected first step, not a weakness to hide.
"The nested loop is what makes this slow — we're re-checking information we've already seen." Naming exactly why it's slow is what leads naturally into the better approach.
"If I store what I've seen in a hash map, I can look it up in O(1) instead of re-scanning." Connect the optimisation directly to the bottleneck you just named.
"This brings it down to O(n) time, O(n) space." Interviewers are listening for this explicitly — say it, don't make them ask.
A 4-week schedule
10-12 problems split across both topics, all easy-to-medium. Goal: comfortable, not fast yet.
8-10 problems. Start timing yourself loosely — aim to at least state an approach within 5 minutes.
8-10 problems on graphs and trees. This topic takes longer to feel natural — budget extra review time here.
6-8 DP problems, then spend the rest of the week doing mixed, untimed-then-timed problems across all six topics, explaining your approach out loud every single time.
Practise the whole interview
DSA is one part. Practise the rest too.
Common questions
DSA prep without the overwhelm