Token Bucket vs. Leaky Bucket - Quant Trader Interview Question
Difficulty: Medium
Category: Algorithms & Data Structures
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: rate-limiting, algorithms, data-structures, trading-systems
Problem Description
You are designing a rate limiter for a high-frequency trading system. Two common algorithms are the Token Bucket and Leaky Bucket. Both control the rate at which requests are processed. However, they differ in how they handle bursts of requests.
Which rate limiting algorithm allows for short bursts of requests exceeding the average rate, while still maintaining an overall rate limit?
Practice this medium trader interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.