Metaseniormar. de 2026
Meta asked this question
Design a data structure that, given a continuous stream of numbers and a fixed window size k, returns the moving average of the last k values each time a new value arrives. The challenge is to maintain the sliding window efficiently (constant-time update and query) while using only O(k) space.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Meta asked this question
Moving Average from Data Stream - Implement the MovingAverage class to calculate the moving average of a stream of numbers.
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.