Quick revision

Cheat sheets & flashcards

Last-minute one-pagers for coding patterns, system design arcs, AI, and behavioral.

Difficulty Easy→Hard Read ~15 min Master night-before refresh Levels All

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

Open Coding Lab · CP chapter cheat sheet

System design whiteboard arc
  1. Clarify functional + non-functional (QPS, size, latency, consistency).
  2. API + data model sketch.
  3. High-level boxes + request flow.
  4. Deep dive hottest path (cache, shard key, queue).
  5. Failure modes + scale bottlenecks.
  6. Trade-offs and what you’d build in v1 vs v2.

System Design Lab · Comparisons

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

AI Lab

Behavioral STAR in 60 seconds

S/T 15s context · A 30s your moves · R 15s metric + learning.

Behavioral lab