...

/

DIY: Moving Average from a Data Stream

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.

Access this course and 1400+ top-rated courses and projects.