Algorithm · Expedia · Medium
Problem Non-critical requests entering a transaction system pass through a throttling gateway that prevents network congestion by enforcing three rate limits based on each request's arrival time. A request must satisfy all three limits; if it fails any one of them, it is discarded. Discarded requests still count toward future window calculations. If a request violates multiple limits at once, it is counted as dropped only once. Given requestsTime, where requestsTime[i] is…
Checking your access…