{"id":"moving-avg-eviction-order","text":"In `MovingAverage.next()`, the subtraction of the evicted element must happen before `deque.append()` because `append` on a full `maxlen` deque silently discards `_queue[0]`.","truth_value":"IN","source":"entries/2026/06/06/moving-average-from-data-stream-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"moving-avg-eviction-order","truth_value":"IN","reason":"premise"}]}}