Moving Window Average
Given a data string and a window size, calculate the moving average. Queue Use a queue to store the window, and maintain a sum. When full, subtract front element and add new element. Note that use long to store intermediate sum, otherwise could overflow. This file contains bidirectional Unicode text that may be interpreted or […]