InterviewDB
Question
Mado Average: Sliding Window Average with Variable Window Size
phone
Question Details
Problem "Mado" (window in Japanese) average: given an integer array and an integer k, compute the moving average using a window of size k. Also implement a streaming version that processes one element at a time. Follow-ups How do you maintain O(1) per element in the streaming version using a deque and running sum? What happens to floating-point precision after many additions? How would you mitigate drift? Extend to a weighted moving average where recent elements have higher weight. How would you…
Full Details
🔒
Unlock all Decagon questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a decagon interview during the phone round.
It covers the following topics: Sliding Window, Phone, Coding, Queue, Arrays, Onsite .
More Decagon Interview Questions
1p3a
decagon tech phone screen interview: cooking app cart implementation
InterviewDB
Function Time: Compute Exclusive Execution Time of Each Process
InterviewDB
Game Sequence: Determine the Winner of an Optimal Token-Taking Game
InterviewDB
Grid Guessing: Minimum Queries to Locate a Hidden Cell in a Matrix
InterviewDB
Decagon SWE Phone - Skyline Buildings (Stack/Geometry)