Placements roadmap
DSA foundations
Complexity, arrays, searching, sorting and hashing: the tools behind most first-round questions. 5 topics, about 26 hours.
Complexity and recursion
About 4 h.
- Give the time and space cost of a loop nest or a recursive function
- Turn a brute-force idea into an O(n log n) or O(n) one and say what changed
Arrays, binary search and two pointers
About 8 h.
- Write binary search without off-by-one bugs, including lower and upper bound
- Use two pointers and a sliding window to replace a nested loop
Visualisers: Searching
Sorting
About 5 h.
- Write merge sort and quick sort from memory and state their costs
- Say when counting sort beats comparison sorts
- Use sorting as the first step of a harder problem
Visualisers: Sorting
Hash maps and sets
About 4 h.
- Use a hash map for counting, grouping and two-sum style lookups
- Explain collisions and why lookups are O(1) on average but not in the worst case
Visualisers: Hashing & indexing
Strings
About 5 h.
- Solve anagram, palindrome and substring questions with counts and windows
- Know what string concatenation costs in your language