DSA in Python - Roadmap
Overview
This roadmap will help you learn Data Structures and Algorithms (DSA) using Python from scratch, divided
into 10 weeks of focused learning and coding.
Recommended for beginners and intermediate learners.
Weekly Plan
Week 1-2: Python Basics + Arrays
Variables, Lists, Loops, Functions, Input/Output, Time Complexity, Array problems like Two Sum, Max
Subarray.
Week 3: Hashing & Strings
Dictionaries, Sets, Anagram detection, Sliding Window, Frequency Maps.
Week 4: Recursion & Sorting
Recursive problems, Merge Sort, Quick Sort, Insertion Sort.
Week 5: Stacks & Queues
LIFO, FIFO structures, Infix to Postfix, Next Greater Element.
Week 6: Linked Lists
Singly & Doubly Linked Lists, Reverse List, Detect Cycles.
Week 7: Trees
Binary Trees, BST, Traversals (Inorder, Preorder, Postorder), Height, Diameter.
Week 8: Graphs
Adjacency List/Matrix, DFS, BFS, Topological Sort, Cycle Detection.
DSA in Python - Roadmap
Week 9: Dynamic Programming I
Fibonacci, Coin Change, Knapsack, Memoization vs Tabulation.
Week 10: DP II + Backtracking
LIS, LCS, Subset Sum, N-Queens, Sudoku Solver.
Tools & Resources
- LeetCode (https://leetcode.com/)
- GeeksforGeeks (https://www.geeksforgeeks.org/)
- Python Tutor (https://pythontutor.com/)
- Google Colab or Jupyter Notebooks
- Notion (for tracking progress)
Tips
- Practice daily (at least 1-2 problems).
- Focus on understanding the logic, not memorization.
- Revisit problems after a few days.
- Dry-run recursive solutions on paper.