Quick revision
Cheat sheets & flashcards
Last-minute one-pagers for coding patterns, system design arcs, AI, and behavioral.
One-page revision notes for last-minute prep. Expand a card, say it aloud in under two minutes, then close it.
Coding patterns flashcard
- Hash map — complement, frequency, first unique
- Two pointers — sorted pair, container, linked-list mid
- Sliding window — fixed / variable; maintain invariant
- Binary search — on index or on answer space
- BFS/DFS — islands, shortest unweighted, topo
- Heap — top-k, merge k, streaming median
- Intervals — sort by start; sweep for rooms
- DP — define state, transition, base; space optimize last
System design whiteboard arc
- Clarify functional + non-functional (QPS, size, latency, consistency).
- API + data model sketch.
- High-level boxes + request flow.
- Deep dive hottest path (cache, shard key, queue).
- Failure modes + scale bottlenecks.
- Trade-offs and what you’d build in v1 vs v2.
AI / RAG interview flashcard
- RAG = retrieve → augment prompt → generate; eval retrieval and answer separately
- Chunking, embeddings, hybrid search, rerank — name failure modes
- Agents = loop with tools + memory + stop conditions; watch cost/latency
- MCP = tool/protocol boundary; authz and least privilege
- Serving: batching, KV cache, quantization, tenancy quotas
Behavioral STAR in 60 seconds
S/T 15s context · A 30s your moves · R 15s metric + learning.