Given a stream of data that comes at irregular intervals, is there a sub-linear time solution to get the moving average within a fixed lookback time window given that the query occurs randomly?

For a moving average problem with fixed window size (in terms of number of items) it is possible to get an O(1) time algorithm. Not sure about the time window version though.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.