C Programming Roadmap
Master Problem Solving & Data Structures in 18 Weeks
This roadmap is designed for both beginners and advanced learners, with optional weeks for competitive programming and interview preparation.
Time Commitment
- Total Learning: 100-150 hours
- Total Practice: 250-350 hours
- Duration: 18 weeks (adjustable based on your pace)
Week-by-Week Roadmap
Click on Category for indetail explanation
| Week | Category | Key Topics | Learning (Hrs) | Practice (Hrs) | Must-Solve Problems | Tips |
|---|---|---|---|---|---|---|
| Week-1 | Basics + I/O | Variables, loops, printf/scanf | 5 | 10 | Sum of digits, Fibonacci, prime check, Armstrong number | Master fast I/O for CP (getchar_unlocked) |
| Week-2 | Control Flow | Nested loops, patterns, switch | 6 | 12 | Pyramid patterns, Pascal's triangle, GCD/LCM, leap year | Optimize loops (avoid pow()) |
| Week-3 | Functions & Recursion | Recursion, call stack | 8 | 15 | Factorial, Fibonacci, Tower of Hanoi, power function (log N) | Learn tail recursion |
| Week-4 | Arrays (1D/2D) | Sorting, searching, matrix ops | 10 | 20 | Binary search, Dutch flag, spiral matrix, Kadane's algo | Prefer Binary Search early |
| Week-5 | Pointers & Memory | Dynamic arrays, function pointers | 12 | 18 | Reverse array using pointers, dynamic 2D arrays | Debug memory leaks (valgrind) |
| Week-6 | Strings | Manual string functions | 10 | 20 | Palindrome, anagram, substring search | Avoid strlen() in loops |
| Week-7 | Structs & Unions | Nested structs, file I/O | 6 | 12 | Student DB system, CSV parsing | Use typedef struct |
| Week-8 | Dynamic Memory | malloc, free, linked lists | 8 | 15 | Dynamic stack/queue, linked list reversal | Free memory! |
| Week-9 | Linked Lists | Singly/Doubly LL, cycles | 12 | 25 | Detect cycle, merge K sorted lists | Fast & slow pointers |
| Week-10 | Stacks & Queues | Infix-postfix, sliding window | 8 | 18 | Next greater element, sliding window max | Use for monotonic problems |
| Week-11 | Trees & BST | Traversals, LCA, BST ops | 15 | 30 | Invert BST, validate BST, serialize/deserialize tree | Recursion → Iterative |
| Week-12 | Graphs (BFS/DFS) | Adjacency list, shortest path | 15 | 30 | Number of islands, topological sort | BFS > DFS for shortest path |
| Week-13 | Sorting & Searching | Quick/Merge sort, counting sort | 12 | 25 | Kth smallest element, inversion count | Master QuickSort partition |
| Week-14 | Bit Manipulation | XOR, masks, bitwise tricks | 6 | 15 | Single number (XOR), count set bits | Low-level optimizations |
| Week-15 | Divide & Conquer | MergeSort, Karatsuba | 8 | 12 | Closest pair of points, max subarray | Optimal for large N |
| Week-16 | Greedy Algorithms | Activity selection, Huffman coding | 6 | 15 | Fractional knapsack, job scheduling | Prove correctness! |
| Week-17 | Dynamic Programming | Memoization, tabulation, LCS | 15 | 35 | 0/1 knapsack, LCS, edit distance | Start with Fibonacci → LCS |
| Week-18 | Backtracking | N-Queens, permutations, subsets | 10 | 20 | Sudoku solver, generate parentheses | Prune early |
Detailed C Problem-Solving Roadmap
Click on Category for indetail explanation
| Week | Category | Topics | Learning Hours | Practice Hours | Key Problems & Concepts | Remarks |
|---|---|---|---|---|---|---|
| Week-1 | Basics | Variables, Data Types, I/O | 5-10 hrs | 5-10 hrs | int, float, printf, scanf, arithmetic operations | Write simple programs (calculator, area of shapes). |
| Week-2 | Control Flow | if-else, loops (for, while) | 5-10 hrs | 10-15 hrs | Number patterns, Fibonacci, leap year, prime check | Master loop optimizations. |
| Week-3 | Functions | Functions, Recursion | 5-8 hrs | 10-15 hrs | Factorial, Fibonacci, pass-by-value vs pass-by-reference | Recursion is key for trees. |
| Week-4 | Arrays | 1D/2D Arrays | 8-12 hrs | 15-20 hrs | Sorting (Bubble, Selection), searching (Linear, Binary), matrix operations | Solve array manipulation problems. |
| Week-5 | Pointers | Pointers, Memory Addresses | 10-15 hrs | 15-20 hrs | Pointer arithmetic, dynamic arrays, function pointers | Critical for DS implementation. |
| Week-6 | Strings | String Manipulation | 8-12 hrs | 15-20 hrs | Palindrome, substring search, manual strlen/strcpy | Avoid library functions for practice. |
| Week-7 | Structures | struct, typedef | 5-8 hrs | 10-15 hrs | Student record system, nested structures | Foundation for linked lists/trees. |
| Week-8 | Memory | malloc, free, calloc | 5-8 hrs | 10-15 hrs | Dynamic arrays, linked list node creation | Prevent memory leaks. |
| Week-9 | Linked Lists | Singly/Doubly Linked Lists | 8-12 hrs | 15-20 hrs | Insert/delete nodes, reverse list, detect cycle | Master pointer chaining. |
| Week-10 | Stacks & Queues | Array/LL Implementation | 5-8 hrs | 10-15 hrs | Infix-to-postfix, queue reversal, balanced parentheses | Used in tree/graph traversals. |
| Week-11 | Trees | Binary Trees, BST, Traversals | 10-15 hrs | 20-30 hrs | Inorder/Preorder/Postorder, BST insertion/deletion, LCA | Recursion-heavy section. |
| Week-12 | Graphs | BFS/DFS, Adjacency List/Matrix | 10-15 hrs | 20-30 hrs | Cycle detection, shortest path (Dijkstra's - Optional) | Build on linked lists/trees. |
| Week-13 | Search & Sort | Merge Sort, Quick Sort, Binary Search | 15-20 hrs | 30-40 hrs | Time/space complexity analysis | Key for coding interviews. |
| Week-14 | Bit Manipulation | Bitwise ops, primes, GCD, modulo | 4-6 hrs | 10-15 hrs | Fast exponentiation, optimization techniques | High utility in coding tests. |
| Week-15 | Divide & Conquer | Merge Sort, Quick Sort, Kadane's | 4-6 hrs | 6-10 hrs | Count inversions, max subarray | Implement D&C algorithms. |
| Week-16 | Greedy | Activity selection, Coin change | 4-6 hrs | 6-10 hrs | Fractional knapsack, Huffman coding | Assign Cookies, Stock Buy/Sell. |
| Week-17 | DP | Memoization, Tabulation | 5-8 hrs | 10-15 hrs | Fibonacci (DP vs recursive), 0/1 knapsack | Climbing Stairs, LCS. |
| Week-18 | Backtracking | N-Queens, Subset generation | 5-8 hrs | 10-15 hrs | Sudoku solver, permutation generator | Combination Sum, Permutations. |
Important Notes
- Beginners: Focus on Weeks 1-12 (Core C + Data Structures)
- Advanced Learners: Include Weeks 13-18 (Algorithms & Problem-Solving)
- Adjust timeline based on your pace (e.g., 2 weeks per topic if needed)
- Consistent daily practice (1-2 hours) is better than occasional long sessions