{"id":"moving-avg-o1-next","text":"`MovingAverage.next()` runs in O(1) time by maintaining a running sum incrementally, avoiding O(k) re-summation of the deque on each call.","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-o1-next","truth_value":"IN","reason":"premise"}]}}