Top-k clicked items over a rolling window
Click events arrive with timestamps. Keep the k most clicked items over the last fixed window of time, evicting old clicks as time moves on. Follow-ups asked about optimizing it and supporting concurrent writers.
No answer yet. Write the first one; the best answer gets endorsed.
