FOUNDATIONS

Interview Prep

Everything pointed at the interview loop — AI and system-design handbooks, language Q&A, the DSA roadmap and runnable coding challenges in one place.

15 pieces · 4 formats

Handbooks 6

Roadmaps 1

Coding Challenges 7

Challenge

Two Sum

The classic warm-up: find the two numbers that add up to a target. Brute force is O(n²) — a hash map gets you to one pass, O(n). Solve it in Python or TypeScript, right in your browser, with hidden tests and a reveal-solution button.

ArraysHash Map
Challenge

Valid Parentheses

The canonical stack problem: decide whether every bracket is closed by the right type, in the right order. A stack turns nested matching into a single pass. Solve it in Python or TypeScript with hidden tests.

StackStrings
Challenge

Fizz Buzz

The famous screening question. Print 1…n, but multiples of 3 become "Fizz", of 5 become "Buzz", and of both become "FizzBuzz". Easy — the catch is testing divisibility in the right order. Solve it in Python or TypeScript.

MathStringsWarm-up
Challenge

Softmax

The function at the end of every classifier and language model: turn raw scores (logits) into a probability distribution. Implement the numerically stable version so big logits do not overflow. Solve it in Python or TypeScript.

AI EngineeringLLMDecoding
Challenge

Cosine Similarity

The measure behind every embedding search and RAG system: how aligned are two vectors, ignoring their length? Dot product over the product of magnitudes — 1 identical, 0 orthogonal, -1 opposite. Solve it in Python or TypeScript.

AI EngineeringEmbeddingsMath
Challenge

Top-K Retrieval

The core of the "R" in RAG: given a query embedding and a set of document embeddings, return the indices of the k most similar docs by cosine similarity, with a stable tie-break. Solve it in Python or TypeScript.

AI EngineeringRAGRetrieval
Challenge

Token-Level F1

The metric behind QA evaluation (SQuAD and friends): how well does a predicted answer overlap a reference as a bag of words? Compute token precision and recall, then their harmonic-mean F1. Solve it in Python or TypeScript.

AI EngineeringEvalsNLP

Interactive Tools 1

More in Foundations

← Browse all topics