Optiver interview question

Sliding window program with newsfeed