Phase 22Days 123-128

Advanced Data Structures

Range-query power tools: Fenwick, segment trees (+ lazy), sparse tables, Mo's

Phase Goal

Add the structures that answer range queries and updates in log time, plus when to use each.

Progress

Day 123: Sparse table & prefix structures

Day 124: Fenwick tree (BIT)

Day 125: Segment tree — basics

Day 126: Segment tree — lazy propagation

Day 127: Segment tree applications & Mo's

Day 128: Advanced DS recap

Phase Complete!

After this phase, you'll be able to:

  • Sparse table & prefix structures
  • Fenwick tree (BIT)
  • Segment tree — basics
  • Segment tree — lazy propagation
  • Segment tree applications & Mo's
  • Advanced DS recap

After Phase 22, explain a core invariant, reconstruct a solution after a delay, diagnose a bug, and solve one unlabelled variation. Repair a failed prerequisite before advancing; record help separately from independent work.