← Questions

Per-key fixed-window cost limiter

0
SpaceXAICodingLast asked Sep 2026

A coding interview question asked in SpaceXAI's onsite applied coding round, last asked Sep 2026. It tests rate limiting, hash maps and time windows.

Build a rate limiter that meters cost instead of counting requests. Each key may spend at most limit cost units in each fixed window of window seconds.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

rate limiting · hash maps · time windows

Your code and the AI tutor open when you unlock this question.