Pergunta de entrevista da empresa OfferUp

How would you implement rate-limiting in code?