Practical backend tasks
Take-home and pairing-round style tasks: caches, rate limiters, retries, log and CSV processing.
- LRU Cache A fixed-capacity cache that evicts the least recently used key, with O(1) get and put.
- Token Bucket Rate Limiter Allow bursts up to a capacity while refilling at a steady rate.
- Key-Value Store with TTL An in-memory cache whose entries expire after a time-to-live.
- Retry with Exponential Backoff Retry a failing operation with exponential delays, but never retry non-retryable errors.
- Top Endpoints from Access Logs Parse web-server log lines and return the most requested paths.
- Revenue Report from CSV Parse a CSV export, skip bad rows and total paid revenue per region.
- Flatten Nested JSON Turn nested objects and arrays into a flat map with dotted keys.
- Group Events into Sessions Split a user's event timestamps into sessions separated by inactivity gaps.
- Find Free Meeting Slots Given busy blocks, list free slots in the working day long enough for a meeting.
- URL Shortener Codes (Base62) Encode numeric IDs into short Base62 codes and decode them back.