Sefism DSA and Problem Solving Roadmap
An eight-stage path from Big-O through arrays, hashing, recursion, trees, graphs, coding patterns and dynamic programming to timed, mixed practice, in Python, Java, C++ or JavaScript. It suits students and developers who can write code but freeze on problems with no obvious library call. By the end you can pick the right data structure, recognise common problem shapes and solve a medium problem in about 35 minutes with edge cases tested.
8
Sefism · Oct 2026
52
Sefism · Oct 2026
300
Sefism · Oct 2026
60
Sefism · Oct 2026
4
Sefism · Oct 2026
4 (Python, Java, C++, JavaScript)
Sefism · Oct 2026
Roadmap
Other
Sefism
About 300 hours, 28 to 60 weeks
Intermediate
Free
What this roadmap is
DSA and problem solving is Sefism's eight-stage path for people who can already write code but freeze when a problem has no obvious library call. It starts with the vocabulary of cost (Big-O), builds the core data structures and algorithms one family at a time, turns them into a set of recognisable problem patterns, and ends with mixed, timed practice where nobody tells you the topic.
The outcome is practical. By the end you should be able to:
- state the time and space complexity of your own code and spot the quadratic loop before it ships
- implement lists, stacks, queues, hash maps, heaps, trees and graphs from scratch and explain what each operation costs
- name the pattern behind an unseen problem (sliding window, two pointers, BFS, backtracking, dynamic programming and more) and apply it
- solve a medium problem in about 35 minutes, with a brute force first, an optimised version after, and edge cases tested
Those same habits carry you through coding rounds, contests and the performance problems you meet in real code.
Who it suits, and who should start elsewhere
It suits university students taking or revising a data structures course, self-taught developers who have built things but never studied algorithms, and working engineers who want to stop being nervous about problem-solving rounds.
It does not suit someone who is still fighting the syntax of their first language. The roadmap says so in its first stage: DSA on shaky syntax is twice as slow. If that is you, start with Programming foundations, which covers a first language, Git and a lighter first pass at data structures. If you already solve mediums comfortably and want rated contests, Competitive programming is the next step after this one.
Editions, prerequisites and time
You choose the language you will solve problems in: Python (the default), Java, C++ or JavaScript. The stages are the same in every edition, but the language-specific parts change, such as which built-in collections to use and which references are recommended.
The estimate is about 300 hours across 8 stages. How that turns into weeks depends on the hours you set on your dashboard:
- A student with 10 to 12 hours a week finishes in roughly 28 weeks, about two semesters. A sensible week is two weekday evenings of 2 hours on new material, a 4 hour weekend block for problems, and 2 hours re-solving the problems you missed the week before.
- Someone working full time with about 5 hours a week should plan for around 60 weeks. Keep it to two short evening sessions and one longer weekend session, and do not try to skip the re-solving: at this pace it matters more, not less.
Prerequisites are simple: you can write loops, functions and basic collections in your chosen language without looking things up every line.
Stage by stage
1. Complexity and Big-O (15 hours)
The vocabulary for everything after it. Topics: what Big-O means and the common growth rates, counting operations in loops, best, worst and average case, space complexity and the call stack, amortised cost, and reading constraints to guess the target complexity. Milestone: take 10 of your own past solutions, write the time and space complexity of each, then time them on 1,000, 10,000 and 100,000 items and check the growth matches your analysis.
2. Arrays, hashing, linked lists, stacks and queues (40 hours)
The linear structures and hash maps most problems are built on: arrays, dynamic arrays and strings, singly and doubly linked lists, stacks, queues and deques, hash maps and sets, prefix sums and frequency counts, and your language's built-in collections with their costs. Milestone: implement a dynamic array, a linked list and a hash map with chaining from scratch, state the Big-O of every operation, then solve 25 easy and 5 medium problems across these structures.
3. Recursion, sorting and searching (30 hours)
Learning to trust recursion, then using it: base case and the call stack, recursion versus iteration, merge sort and quicksort, binary search with its boundary variants, and binary search on the answer, with counting sort as an optional extra. Milestone: write merge sort, quicksort and a first-occurrence binary search without a reference, explain their costs, and solve 10 binary search problems, two of them searching over the answer.
4. Trees and heaps (35 hours)
The four binary tree traversals, root-to-leaf paths and tree DFS, level order traversal, binary search trees and their invariant, heaps and priority queues, and balanced trees in concept. Milestone: implement a BST with insert, delete and all four traversals and an array-backed min-heap, then solve 15 tree and heap problems, writing what a child returns to its parent before coding each one.
5. Graphs (35 hours)
Adjacency lists, matrices and grids, BFS and DFS, connected components and union-find, cycle detection and topological sort, shortest paths with Dijkstra, and minimum spanning trees as an optional topic. Milestone: detect a cycle in course prerequisites and output a valid order, count islands in a grid with both BFS and DFS, and find the cheapest route in a weighted graph with Dijkstra.
6. Coding patterns (60 hours)
The longest stage, and the one where unfamiliar problems start to look familiar: two pointers, sliding window, fast and slow pointers, merge intervals, monotonic stack, top K elements and K-way merge, BFS, DFS and topological sort as patterns, backtracking and tries, with bitwise XOR as an optional extra. Milestone: solve three unseen medium problems per pattern, writing the pattern name and the brute force with its cost before any code.
7. Dynamic programming (45 hours)
Dynamic programming taught as recursion plus a cache: from recursion to memoisation, tabulation and space optimisation, one-dimensional DP and Kadane's algorithm, grid paths and counting, 0/1 and unbounded knapsack, and the longest common subsequence family. Milestone: solve a knapsack, an LCS and a grid path problem three ways each (plain recursion, memoised, tabulated), write the state and transition in one sentence, then solve 10 more.
8. Timed practice and coding-round habits (40 hours)
Mixed problems where the topic is not given, and the habits that make you reliable under a clock: a 45-minute routine, thinking aloud, testing by hand, mixed lists, contests and re-solving misses. The stage includes a checklist: restate the problem, list edge cases first, say the brute force and its cost aloud, keep to a clock (about 5 minutes to understand, 10 to plan, 20 to code, 10 to test) and state the complexity of everything you submit. Milestone: a mixed list of 40 problems at about 35 minutes each, four timed contests, and every missed problem re-solved two days later.
Projects that fit
The roadmap suggests four final year project ideas that put the material to work:
- Algorithm visualisation puzzle game, because animating sorts and searches forces you to understand every step
- Timetable scheduling with constraint solving, with graphs, backtracking and search on a real scheduling problem
- Procedural level generation with guaranteed solvability, where BFS and A* prove each level can be solved
- A vector search engine built from scratch, for heaps, graphs and complexity trade-offs under real performance pressure
How it works on Sefism
Everything on Sefism is free to learn from. The public page at DSA and problem solving shows the full stage list for your chosen language edition, with the first two stages open: their topics, milestones and recommended material. Later stages show their title, summary, hours and topic count.
To open every stage, add the roadmap to your dashboard. Adding a roadmap uses credits, new members get starting credits when they join, and your first roadmap is free. Once it is on your dashboard you can:
- open every stage, its topics, checks and recommended material
- tick stages off and track your progress, at a pace set by the hours you have each week
- keep the companion DSA and problem solving cheat sheet, which comes with the roadmap
- ask Tauseef a question about any stage, or book a 1:1 session if you want to talk your plan through
If you are new, create a free account first. Credits are there so the platform goes to people who are actually learning, and if you run out while learning seriously, you can ask for more.
Each stage also carries a ready-made AI tutor prompt. The roadmap's advice is to use it for hints and questions only, never for full solutions.
The companion cheat sheet
The DSA and problem solving cheat sheet follows the same order in nine chapters, from complexity to timed practice, with the cost of every structure and algorithm stated. Use it to revise a chapter after finishing each stage and again before a contest or coding round.
Related on Sefism
- How to start DSA when you cannot solve problems
- Is DSA still worth learning with AI?
- How many LeetCode problems are enough?
- How to learn DSA from scratch
- Fifteen problem shapes and the move that solves each
- Choosing a data structure is choosing what to make cheap
- Grokking the Coding Interview: Patterns for Coding Questions and VisuAlgo, both recommended inside the stages
What you can do afterwards
You can work an unfamiliar problem from a brute force to an efficient solution, explain the trade-off you made, and do it against a clock. From here, Competitive programming takes the speed further, and the build roadmaps such as Backend development put the same thinking to work on real systems.
Frequently asked questions
How long does it take to learn DSA? The roadmap estimates about 300 hours. At 10 to 12 hours a week that is roughly 28 weeks; at 5 hours a week it is closer to 60.
Which language should I use for DSA? The one you already write most comfortably. Python, Java, C++ and JavaScript all have an edition. Python gives the shortest code, C++ is popular for contests, and JavaScript makes sense if you already build for the web.
Is DSA still worth learning in 2026, with AI tools around? Yes, for the reason the roadmap is built on: knowing what code costs and which structure fits is the judgement you need to review any code, including code an AI tool wrote. Coding rounds still test it, too.
How many problems should I solve? The milestones add up to a few hundred, but the roadmap cares more about how you solve them: brute force and cost first, the pattern named, misses re-solved two days later.
What if I get stuck on a problem? Stage 6's advice: after 25 minutes, read the solution, close it, and re-solve it from memory two days later. Learn one pattern at a time rather than mixing them early.
Ready to start?
Opens on Sefism in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.