BTreeMap/BTreeSet throughout, sort+windows for dedup, stateless design. Rust type system prevents most MOAD patterns structurally.