Coding & DSA
89 questionsDONEUNLOCKEDLOCKED
Coding & DSA Interview Questions for AI Engineers
Multi-part practical builds (in-memory DBs, rate limiters, parsers) plus the LeetCode-medium staples, calibrated to OpenAI/Anthropic practical screens and Meta/Palantir classics.
Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.
THE ONE-PAGE VERSION

You have 10 free answers unlocked here.Sign in free for 10 more · 69 are premium.
01–36Foundationsthe vocabulary every loop assumes you already have0/36 done
37–68Core loopsthe questions every loop actually asks0/32 done
69–89Field scenariosthe messy, half-specified problems from real deployments0/21 done
The concepts behind Coding & DSA
The vocabulary and mental models these questions assume, from our curriculum. Start with the foundations free; the deeper, interview-defining ideas are part of premium.
Foundational
Parsing Messy, Real-World DataCustomer files are dirty: inconsistent quoting, missing headers, junk rows, encodings that lie. The job is to parse defensively, skip and log bad rows instead of aborting the whole batch, and keep parsing pure and separate from business logic so it stays testable and deterministic. This is most of what early FDE data-ingestion work actually is.Foundational
Big-O That Actually MattersOn a deployment, Big-O is not a whiteboard puzzle; it is the one calculation that tells you whether the customer's data fits in the approach you picked. The skill is spotting the term that dominates at their scale, knowing when brute force dies and you need an index or ANN, and recognizing when constant factors and memory decide the outcome instead of the exponent.Core
Testability and Dependency InjectionCode that reaches out to the clock, the network, the filesystem, or a random generator cannot be tested deterministically, because its output depends on the world. The fix is to separate pure logic from side effects and inject the things that touch the world (the clock, I/O, randomness) so a test can pass fakes. When you inherit untestable code, pin its current behavior with a characterization test first, then refactor under that net.Sign in
Core
Streaming and BackpressureStreaming processes data one chunk at a time so memory stays flat no matter how big the input is. The moment a producer outruns its consumer, you need backpressure: a bounded buffer that makes the producer wait instead of piling unbounded work into memory. In Python this is generators and chunked reads for the streaming half, and a bounded queue (or a blocking put) for the backpressure half. Get it wrong and a 50 GB file or a fast upstream OOMs the box.Sign in
Foundational
Sliding Window and Two PointersA huge fraction of array and string screens are really one of two patterns. Two pointers walk a sorted structure from both ends or at two speeds; the sliding window keeps a running answer over a contiguous range and slides instead of recomputing. Both turn an obvious O(n^2) double loop into a single O(n) pass, and recognizing which one applies is most of the battle in a 25-minute screen.Foundational
Heaps and Top-KWhen a problem says top-K, K-th largest, or merge K sorted streams, the answer is almost always a heap. A binary heap gives you the smallest (or largest) element in O(1) and insert/pop in O(log n), which turns a full O(n log n) sort into an O(n log k) scan when you only need the K best. The recurring trick, counterintuitive at first, is to keep a min-heap of size K to find the K largest.Core
Graph Traversal and Topological SortGrids, dependency chains, task schedulers, and path problems are all graphs in disguise. BFS finds shortest paths in unweighted graphs and explores level by level; DFS goes deep and is the backbone of cycle detection. Topological sort orders a DAG so every dependency comes before what needs it, and the same machinery tells you whether a dependency graph has an impossible cycle.Sign in
Core
Caching and EvictionA cache is bounded memory in front of expensive work, so the real design question is what to throw away when it fills. LRU evicts the least recently used entry and is the default; it is built from a hash map plus a doubly linked list to get O(1) get and put. TTL adds time-based expiry. Picking and implementing the right eviction policy is one of the most common practical FDE coding screens.Sign in
