Meta·Machine Learning Engineer·Technical Phone Screen
- Design a class that tracks a running mean over a stream of numbers with O(1) add and mean operations. Then discuss numerical stability for very long streams and how you'd extend it to a sliding window over the last K elements.
“I jumped straight to the naive sum-divided-by-count approach, which works fine until they asked about numerical stability for huge streams.”