Data Structures & Algorithms COURSE·LESSON 01 OF 1710 completed

Start Here: Your 90-Day DSA Interview Roadmap

Goal: Learn a repeatable way to solve interview problems, then use the 150-problem sequence from the supplied roadmap. The course groups problems by pattern so the idea is taught before practice; every problem lesson keeps its original problem number and study day.

How to use each lesson

  1. Read the goal and constraints in your own words. Open the linked LeetCode statement for the exact contract.
  2. Before reading the solution, state a brute-force approach and its cost.
  3. Identify the pattern and the invariant that makes the faster method safe.
  4. Work through the animated diagram, then trace the pseudocode on paper.
  5. Explain correctness and complexity aloud before coding.
  6. Implement the idea in your interview language and run the linked problem.
  7. Mark the lesson complete only after you can reproduce the approach without notes.

Interview routine: clarify, model, improve, prove, test

  • Clarify: Ask about input size, duplicates, ordering, mutation, empty input, and output format.
  • Model: Translate the story into an array, graph, tree, interval, or state transition.
  • Baseline: Describe the simplest correct algorithm and its complexity.
  • Improve: Find repeated work and match it to a data structure or pattern.
  • Prove: State the loop invariant, exchange argument, or recurrence.
  • Test: Trace the smallest input, a boundary case, and a case that breaks a naive solution.

Complexity you should be fluent with

| Growth | Typical meaning | |---|---| | O(1) | Fixed number of operations | | O(log n) | Repeatedly halve a search space | | O(n) | One or a constant number of passes | | O(n log n) | Comparison sorting or heap work | | O(n²) | Compare many pairs or fill an n×n table | | O(2ⁿ), O(n!) | Enumerate subsets or permutations; pruning matters |

Always state auxiliary space separately from output space.

Follow the original 90-day cadence

The sheet spaces 150 problems over 90 days and includes review sessions. Follow the day-by-day schedule below. Review days are deliberate: redo old problems from memory, explain the invariant, and change one edge case. On Day 89, solve the final problem, then revisit your five weakest problems; Day 90 is a timed mock interview.

Pseudocode conventions

Pseudocode is language-neutral: map means a key-value dictionary, set means unique membership, push/pop describe a stack/heap operation as named, and ranges are written explicitly. Translate details such as integer division, queue APIs, and overflow handling to your chosen language.

Common interview traps

  • Start coding before confirming what “subarray”, “substring”, “subsequence”, or “path” means.
  • State O(n) for an algorithm that sorts first; sorting usually costs O(n log n).
  • Forget duplicate handling, zero/negative inputs, and off-by-one endpoints.
  • Use a greedy rule without proving why discarding alternatives is safe.
  • Give code without explaining the invariant and how it yields correctness.

The course contains all 150 numbered problems from the workbook. Problem statements live at their linked source; the lessons teach the concepts and provide original explanations and pseudocode rather than copying the full prompt.

The 90-day roadmap

Move through one week at a time. Practice days build the pattern library; each week ends with a planned review to bring earlier problems back from memory.

Week 01 · Days 01–07

Week 02 · Days 08–14

Week 03 · Days 15–21

Week 04 · Days 22–28

Week 05 · Days 29–35

Week 06 · Days 36–42

Week 07 · Days 43–49

Week 08 · Days 50–56

Week 09 · Days 57–63

Week 10 · Days 64–70

Week 11 · Days 71–77

Week 12 · Days 78–84

Week 13 · Days 85–90

Learn at your own pace0 / 171 lessons complete