React typeahead with async suggestions and keyboard navigationCodingBuild a typeahead in React: a search input with a dropdown of suggestions that come from an asynchronous source while the user types. The user can pick a suggestion with the mouse…
Sort an array with k worker threadsCodingImplement parallelsort(nums: listint, k: int) - listint, which returns every element of nums in ascending order and uses k worker threads for the heavy lifting. Rules - Split nums…
Last asked Sep 2026
Anthropic OA: leveled in-memory record storeCodingA timed, multi-level exercise building an in-memory store of records with fields: create and read first, then scans and filters, then timestamps with expiry, then backup and…
Last asked Apr 2026
React list loaded with useEffectCodingWrite a React component that loads a list from an endpoint with useEffect and displays it. Handle loading and error states, keys for list items, and cleanup so a late response…
Last asked Sep 2026
Render nested JSON in a code-style viewerCodingBuild a React component that displays a given JSON object the way a code editor would: indentation, braces and brackets, keys and values styled by type, and nested objects and…
Last asked Sep 2026
Per-key fixed-window cost limiterCodingBuild a rate limiter that meters cost rather than request count. Each key may spend at most limit units in each fixed window of window seconds, with windows aligned to multiples…
Last asked Sep 2026
Resumable iterators that save and restore their positionCodingDefine an iterator interface that can export its state and be resumed from it later. Implement it for a flat list, then for nested multi-dimensional lists, then across several…
Last asked Apr 2026
Per-user token bucket limiter with interval refillsCodingBuild a per-user token rate limiter for an AI API. Every user has their own policy, and one user's traffic never affects another's. A policy has three positive integers: -…
Last asked Apr 2026
Backend for a game of checkersCodingBuild the backend of a checkers game under time pressure: board state, legal moves, captures and the win condition, with a data model you can explain. A working core matters more…
Last asked Feb 2026
Total listener time per live audio room from an event logCodingA time-ordered log records rooms being created and users joining and leaving them. Compute the total user-time spent in each room, handling users who never leave and rooms that…
Last asked Feb 2026
Radix cache for integer sequences with LRU evictionCodingImplement RadixCache, a cache of integer sequences (for example, token IDs of model prompts) stored in a radix tree: a trie whose edges hold runs of integers instead of single…
Last asked Jan 2026
K-th largest value over the last N seconds of a streamCodingStart with finding the k-th largest element of an array. Then values arrive with timestamps and queries ask for the k-th largest among values from the last N seconds; design a…
Last asked Jan 2026
Key-value store with nested transaction rollbackCodingImplement an in-memory key-value store whose string keys map to string values. It supports transactions, and transactions can be nested. Implement the class KeyValueStore: -…
Last asked Jan 2026
Crash-safe on-disk key-value storeCodingBuild a filesystem-backed hash table that survives crashes and restores every entry from the latest state on restart. Reported on 1point3acres' Baseten bank; reconstructed in our…
Last asked Jan 2026
LRU cache where each item counts by its quantityCodingImplement an LRU cache in which every item carries a quantity, and capacity is measured in total quantity rather than number of items. A put may evict several least recently used…
Possibly retired
LFU cacheCodingImplement a least-frequently-used cache with get and put in O(1). When full, evict the key used least often, breaking ties by least recently used. Keep a map from key to node and…
Possibly retired
Task scheduler with a cooldown between identical tasksCodingGiven a list of tasks (letters) and a cooldown n, identical tasks must be at least n time units apart; the CPU can idle. Return the fewest time units to run them all. Solve it…
Possibly retired
LRU cacheCodingBuild a key-value cache with a fixed capacity that evicts the least recently used entry when it is full. get(key) returns the value or a miss, put(key, value) inserts or updates…
Possibly retired
Predictive text for a phone keypadCodingOn a phone keypad each digit maps to several letters (2 = abc, 3 = def, ...). Given a dictionary and a sequence of digit presses, return the words the sequence could spell, T9…
Possibly retired
Merge known bigrams in a sentence, leftmost firstCodingWrite a function that splits a sentence into tokens using a dictionary of known two-word phrases (bigrams). - text is a non-empty string of lowercase words separated by spaces. -…
Question types
SpaceXAI onsite applied coding interview: questions and format