DSA Weekly Plan - HoseaCodes/OnePercent GitHub Wiki

Month 1: Master the Basics

Week 1: Arrays and Strings

  • Day 1-2: Learn sliding window and two-pointer techniques. Implement examples manually.
  • Day 3-4: Solve 4–6 easy problems (e.g., substring search, duplicate finding).
  • Day 5: Revise concepts and retry failed problems.
  • Day 6-7: Build a small project (e.g., string pattern matcher).

Week 2: HashMaps and HashSets

  • Day 1-2: Study frequency counting and grouping problems. Write implementations.
  • Day 3-4: Solve problems like anagrams, two-sum, and subarray sums.
  • Day 5: Attempt mock interviews with 3 problems.
  • Day 6-7: Build a basic text frequency analyzer tool.

Week 3: Stacks and Queues

  • Day 1-2: Learn usage and applications, including parenthesis matching.
  • Day 3-4: Solve problems on stacks/queues, like "Next Greater Element."
  • Day 5: Practice implementing stack/queue from scratch.
  • Day 6-7: Build a basic calculator with stack operations.

Week 4: Recursion and Backtracking

  • Day 1-2: Understand recursion principles and solve basic problems.
  • Day 3-4: Focus on backtracking problems (e.g., N-Queens, permutations).
  • Day 5: Solve 2 medium-level backtracking problems.
  • Day 6-7: Revise and complete 10 problems for review.

Month 2: Intermediate Data Structures

Week 1: Sorting Algorithms

  • Day 1-2: Learn and implement merge sort and quick sort.
  • Day 3-4: Practice problems on sorting (e.g., sorting by criteria).
  • Day 5: Build a sorting visualizer project.
  • Day 6-7: Explore heap sort and compare sorting complexities.

Week 2: Binary Search

  • Day 1-2: Study binary search basics and edge cases.
  • Day 3-4: Solve search-related problems (e.g., rotated arrays).
  • Day 5: Solve 3 medium binary search problems.
  • Day 6-7: Implement a custom search engine with binary search.

Week 3: Linked Lists

  • Day 1-2: Learn operations for singly and doubly linked lists.
  • Day 3-4: Solve problems on reversing, merging, and detecting cycles.
  • Day 5: Revise with mock problems.
  • Day 6-7: Build a basic file system simulation using linked lists.

Week 4: Trees

  • Day 1-2: Study tree traversals (in-order, pre-order, post-order).
  • Day 3-4: Solve binary tree problems like level-order traversal.
  • Day 5: Solve problems involving binary search trees (insert, search).
  • Day 6-7: Build a family tree visualizer using tree data structures.

Month 3: Advanced Algorithms

Week 1: Graph Algorithms

  • Day 1-2: Learn BFS and DFS, and implement from scratch.
  • Day 3-4: Solve problems on shortest paths (Dijkstra, A*).
  • Day 5: Revise and attempt a graph-related mock interview.
  • Day 6-7: Create a pathfinding visualizer.

Week 2: Dynamic Programming (DP)

  • Day 1-2: Understand basic principles (tabulation, memoization).
  • Day 3-4: Solve problems like knapsack, Fibonacci, and grid traversal.
  • Day 5: Practice medium DP problems.
  • Day 6-7: Build a DP-based game solver (e.g., coin change).

Week 3: Greedy Algorithms

  • Day 1-2: Learn interval scheduling and Huffman coding.
  • Day 3-4: Solve problems on greedy strategies.
  • Day 5: Implement greedy algorithms for real-world problems.
  • Day 6-7: Build a job scheduling tool using greedy algorithms.

Week 4: Heaps and Priority Queues

  • Day 1-2: Study heaps (min-heap, max-heap) and priority queue operations.
  • Day 3-4: Solve problems involving heap-based solutions.
  • Day 5: Practice heap-related interview problems.
  • Day 6-7: Implement a priority-based task scheduler.

Month 4: Competitive Programming

Week 1: Segment Trees and Fenwick Trees

  • Day 1-2: Learn segment tree construction and operations.
  • Day 3-4: Solve range query problems.
  • Day 5: Implement a range sum query tool.
  • Day 6-7: Compete in live coding contests.

Week 2: Advanced Graphs

  • Day 1-2: Study MST (Kruskal, Prim) and Tarjan's algorithm.
  • Day 3-4: Solve problems on connected components.
  • Day 5: Attempt competitive graph problems.
  • Day 6-7: Build a city navigation tool using graph algorithms.

Week 3-4: Practice Contests

  • Day 1-2: Focus on solving random problems under timed conditions.
  • Day 3-4: Revise failed problems and document patterns.
  • Day 5-7: Compete in contests and improve rankings.

Month 5 & 6: Revision and Projects

  • Daily Routine:

    • Revise a key topic each day.
    • Solve 2–3 mixed difficulty problems.
    • Dedicate time to major projects:
      • Algorithm Visualizer Tool.
      • Real-Time Recommendation System.
  • Weekends:

    • Publish project updates.
    • Write blogs about challenges and solutions.
    • Participate in contests or contribute to open source.