moving-avg-sum-invariant

Status: IN

`self._sum == sum(self._queue)` holds after every `next()` call in `MovingAverage`; if this invariant breaks, all subsequent averages silently return wrong values.

Source: entries/2026/06/06/moving-average-from-data-stream-solution.md

JSON