Implement RecentCounter, which counts requests inside a sliding time window. ping(t) records a request at time t milliseconds and returns how many requests happened in the inclusive range [t - 3000, t]. Every call uses a strictly larger t than the call before it.
Implement RecentCounter, which counts requests inside a sliding time window. ping(t) records a request at time t milliseconds and returns how many requests happened in the inclusive range [t - 3000, t]. Every call uses a strictly larger t than the call before it.