DSA Questions Advanced¶
Coding-interview questions grouped by pattern, so you learn to recognise the technique rather than memorise answers. Every solution is in commented Python with time and space complexity.
Patterns covered¶
Arrays & hashing
Frequency maps, prefix sums, grouping.
Core
Two pointers & sliding window
Pairs, longest/shortest windows, deduplication.
Core
Binary search
Sorted data, rotated arrays, searching on the answer.
Core
Stacks & monotonic stacks
Brackets, next-greater element, histogram areas.
Core
Linked lists
Reversal, cycle detection, merging, LRU cache.
Core
Trees & BSTs
Traversals, depth, lowest common ancestor, serialisation.
Core
Heaps & top-k
K largest, merge k sorted lists, running median.
Intermediate
Intervals & greedy
Merging, scheduling, meeting rooms, jump games.
Intermediate
Backtracking
Subsets, permutations, combination sums, N-Queens.
Intermediate
Graphs
BFS/DFS, islands, topological sort, Dijkstra, cycle detection.
Advanced
Dynamic programming
1-D, 2-D grids, knapsack, intervals, strings, bitmask DP.
Advanced
Tries & string algorithms
Prefix search, autocomplete, KMP, rolling hash.
Advanced
Union-find
Connected components, redundant edges, accounts merge.
Advanced
Segment & Fenwick trees
Range queries and updates, counting inversions.
Expert
Every question includes¶
- How to spot the pattern from the problem statement
- Brute force first, then the optimal approach — and why it's faster
- Commented Python solution and test cases
- Time and space complexity, plus common follow-ups
Get notified when the DSA track launches — early-bird price for the waitlist.