Design an Expiring Counter with Sliding Window

Asked at Uber · Coding Questions · Difficulty: Medium

Design an expiring counter that tracks how many unexpired copies of each element are currently stored.

Loading the problem…