返回题库

Quant Interview Practice Questions

专题
难度
L2
来源
MyntBit

题目详情

Rate limiting is a critical component in algorithmic trading systems and exchange gateways, preventing infrastructure from being overwhelmed by unexpected bursts of traffic such as misconfigured algorithms submitting excessive orders. The Leaky Bucket algorithm acts as a strict meter that smooths out these bursts by processing requests at a constant, continuous rate. Task Implement a LeakyBucket class that rate limits incoming requests.

  • LeakyBucket(double capacity, double leak_rate): Initial