linear-time | ScratchStats