Technical

Create a Python class that maintains a rolling average of the last N numbers added to it. The class should have methods to add a new number and retrieve the current rolling average.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

Practice More Questions

No answers yet

Be the first to share your approach to this question

Interview question asked to Business Intelligence Engineers interviewing at Amazon: Create a Python class that maintains a rolling average of the last N numbers added to it. The class should have methods to add a new number and retrieve the current rolling average..