Object-Oriented Programming · Roblox · Medium
Implement a ClientHitCounter class that maintains separate hit histories for each client. A hit consists of a clientId and a timestamp in seconds. The class should expose: ClientHitCounter() — initializes an empty counter. void hit(String clientId, int timestamp) — records one hit for clientId at timestamp. int getHits(String clientId, int timestamp) — returns the number of hits for clientId whose recorded time t satisfies the inclusive range $$timestamp - 299 \le t \le…
Checking your access…