← Practice
Foundation Bank: Backend Primitives
6 problems from the Foundation Bank's "Backend Primitives" section — reasoning/diagnostic items graded through Explain Mode, not executed.
6 questions
- LRU CacheDesign an LRU (Least Recently Used) cache with O(1) get and put operations. Explain the data structures you'd use and why, and what happens on a cache hit vs. a cache miss when the cache is full.mediumWritten30 min
- Token Bucket Rate LimiterDesign a token bucket rate limiter that allows an average of N requests per second but tolerates short bursts. Explain how tokens are added and consumed, and what happens when a request arrives with no tokens available.mediumWritten30 min
- Circuit BreakerDesign a circuit breaker that protects your service from repeatedly calling a failing downstream dependency. Explain the states it moves through and what triggers each transition.mediumWritten30 min
- Connection PoolExplain why a service uses a connection pool for its database connections instead of opening a new connection for every request, and what happens when a request arrives and the pool is fully checked out.mediumWritten30 min
- Retry with Exponential Backoff + JitterExplain why a retry mechanism should use exponential backoff with jitter instead of retrying immediately or at a fixed interval, especially when many clients might be retrying the same failing dependency at once.mediumWritten30 min
- Priority Job QueueDesign a job queue where higher-priority jobs are processed before lower-priority ones, even if the lower-priority jobs were submitted first. Explain the data structure you'd use and how priority is used.mediumWritten30 min