Pregunta de entrevista de Meta

Implement a tree. The second question was about moving average