Algorithms, design and transformer calculations
Step through a worked solution, follow the data as it changes, then practise the same idea in a problem.
BFS from A. Queue holds the frontier.
Choose your task
Problems, explanations and calculations
Choose a problem to practise, a design note to read, or a calculation to inspect step by step.
01
DSA
170 problem labs · 37 patterns · 121 atlas modules
Trace a worked solution, practise an implementation, or study the underlying data structure.
02
System design
85 design notes · LLD, SOLID, scale, GoF
Explore concrete design decisions, their constraints and the trade-offs between alternatives.
03
LLM visualizations
16 transformer labs · BPE to nucleus sampling
Calculate attention scores, trace a KV cache and inspect position encoding with small worked matrices.
DSA problems
Trace a worked solution
LLM visualizations
Attention as a heatmap
Byte-pair encoding
Start from characters. Repeatedly glue the pair that appears most often until the vocabulary is a handful of subwords.
Scaled dot-product attention
The transformer’s inner product: scores from queries against keys, scaled so softmax does not saturate, then a weighted sum of values.
KV cache (incremental decode)
At step t you only need a new Q. Keys and values for 0…t−1 are already sitting in cache. Prefill writes the prompt; decode appends one column.
Nucleus (top-p) sampling
Sort token probabilities, keep the smallest prefix with mass ≥ p, then renormalize and sample. Compare the retained tokens as p changes.
System design
LLD you can sketch
Also in the studio
Atlas, Java, patterns
121 structure labs
Lists through network flow. 11 categories, including Array / ArrayList.
patterns37 named templates
Sliding window through N-queens — skeleton, pitfalls, worked labs.
java83 notes · 17 categories
Practise Java concepts from object-oriented programming to Spring applications.
quiz · drillPattern quiz and self-practice
Identify an algorithm pattern, then practise a set of problems and record what needs another attempt.