DIY: Moving Average from a Data Stream

Solve the interview question "Moving Average from a Data Stream" in this lesson.

Problem statement

In this challenge, you are given a list of integers and a window size as input. Your task is to calculate the moving average of all the integers present in that sliding window.

The function should return the moving average of the elements present in the window.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.