Phase 1 — Core Data Structures

Weeks 6–12 | Sep 8 – Oct 18, 2026 | ~60–90 hours total

You finished Phase 0 knowing how to reason about algorithms. This phase gives you the vocabulary to have that reasoning apply to real problems. Every LeetCode problem you will ever solve uses at least one of the structures covered here — not as a black box you import, but as a mechanism you understand cold. The difference between knowing the API and knowing the machine is the difference between solving medium problems in 30 minutes and staring at them for two hours.

The goal is mechanical understanding: you can describe what happens in memory when you insert into a hash map, explain why building a heap from an array is O(n) and not O(n log n), and implement any of these structures from scratch without reference. That level of understanding also means you can adapt the structure when the problem requires a twist — and hard problems almost always require a twist.


What This Phase Builds

By the end of Week 12, you will have:

  • Implemented every data structure below from scratch at least once

  • Solved 30 LeetCode problems deliberately spread across these structures

  • A personal pattern taxonomy you can reproduce from memory


The 7 Topics

Data Structure

Core Operations

Worst-Case Complexity

Best Starting Resource

Arrays (static + dynamic)

access, insert, delete, resize

O(n) insert/delete; O(1) access

CLRS Ch 10, NeetCode Arrays playlist

Strings

substring, compare, reverse, split

O(n) most ops

LeetCode Explore: Strings

Linked Lists (singly, doubly, circular)

traverse, insert, delete, reverse

O(n) access; O(1) head insert

VisuAlgo Linked List, CLRS Ch 10.2

Stacks & Queues

push, pop, enqueue, dequeue

O(1) all (amortized for array-backed)

Abdul Bari Stack/Queue lectures

Deque + Monotonic Stack/Queue

push/pop both ends, next-greater

O(1) deque ops; O(n) total for monotonic

NeetCode Monotonic Stack problems

Hash Maps & Hash Sets

insert, lookup, delete

O(n) worst case; O(1) amortized

MIT 6.006 Lecture 8 (Hashing)

Heaps & Priority Queues

insert, extract-min/max, build

O(log n) insert; O(n) build

MIT 6.006 Lecture 4 (Heaps)


3 Things Learners Get Wrong in This Phase

1. Treating data structures as APIs instead of mechanisms. If you only know HashMap.put() and HashMap.get(), you will fail the moment an interviewer asks “what’s the worst-case time complexity of that operation?” or gives you adversarial input that degrades your hash map to O(n). Understand why each operation costs what it costs.

2. Skipping from-scratch implementation. Reading about a linked list reversal and writing it are completely different cognitive acts. The bugs you hit during your first from-scratch implementation teach you more than 10 more reading sessions. Every structure in this phase must be hand-coded at least once.

3. Treating each structure in isolation. Real problems combine structures. The sliding window maximum problem uses a deque and array indexing together. Dijkstra’s uses a priority queue and a hash map. Start noticing combinations as early as Week 8.


Exit State

You are ready for Phase 2 (Sorting, Searching, Recursion) when:

  • You can implement any structure in this phase from scratch in under 45 minutes

  • You can derive the time/space complexity of any operation without looking it up

  • You’ve solved the 30-problem sprint in 06_exit_criteria_and_projects.md with ≥ 80% solved independently