Pergunta de entrevista da empresa Google

They gave me a problem about designing a rate limiter for an API. Had to walk through different algorithms like token bucket vs sliding window, discuss tradeoffs, then code up a working solution. Interviewer kept adding constraints to see how I'd adapt the design under pressure.