The concept library
Learn the reasoning.
Start with Python, databases, or clear algorithmic steps, then explore related concepts. No enrolment required.
Published concepts
- Beginner
Thinking in Algorithms
Turn an everyday job into clear steps, then check that those steps finish and give the right answer.
- Beginner
Arrays and Lists
Picture numbered slots, then learn how to read, change, add, and remove items without confusing a position with a value.
- Beginner
Strings
Treat text as an ordered sequence, while remembering that Python strings cannot be changed in place.
- Beginner
Traversing a List
Visit each item once, like checking every shelf slot, and use a loop to build a result.
- Beginner
Time and Space Complexity
Count how work and extra storage grow when the input gets bigger, instead of guessing from a stopwatch.
- Beginner
Sorting
Start with arranging books and prices, then understand the steps computers use to put things in order.
- Beginner
Bubble Sort
Compare neighbouring number cards, swap the ones in the wrong order, and see why a full pass helps.
- Beginner
Selection Sort
Search for the smallest remaining number, put it in place, and repeat.
- Beginner
Insertion Sort
Keep part of a row in order, then make room and slide the next number into the right place.
- Beginner
Linear Search
Look through items one at a time, stop at the first match, and know what happens when nothing matches.
- Beginner
What Is Artificial Intelligence?
Meet intelligent agents through a familiar task and learn what rational behaviour means.
- Beginner
Recognising Coding Patterns
Choose a technique from the problem's rules rather than its name.
- Beginner
Binary Search
Use an already sorted row to rule out half the remaining positions at each decision.
- Beginner
What Is Generative AI?
Compare generating examples with classifying them.
- Beginner
How Services Work Together
Learn the basic language of requests, capacity, and failure.
- Beginner
States, Actions, and Search
Represent a small problem as states and possible moves before searching.
- Intermediate
Linked Lists
Follow a chain of nodes and see how links let a list grow without shifting a row of slots.
- Beginner
Four Ways to Generate
Build intuition for autoregressive, variational, adversarial, and diffusion models.
- Beginner
Load Balancing
Distribute requests across healthy service instances.
- Beginner
Knowledge, Rules, and Plans
Represent facts and use rules to reason about actions and goals.
- Intermediate
Stacks
Add and remove from the same end, like a stack of plates, and understand when last-in-first-out helps.
- Beginner
Tokens, Context, and Language Models
Follow a prompt through tokenisation and prepared next-token inference.
- Beginner
Caching and Freshness
Reuse a nearby copy while making its freshness limits explicit.
- Beginner
Preparing Text for Language Tasks
Explore tokens, normalisation, stemming, and lemmatisation with a small sentence.
- Intermediate
Queues
Follow a first-in-first-out line and see why a queue needs a front and a back.
- Beginner
Prompts, Hallucinations, and Retrieval
Ask clearly and use external evidence without assuming generated answers are true.
- Intermediate
Hash Tables
Use keys to find values, and see why different keys can share a bucket.
- Intermediate
Recursion
Solve a smaller version of a problem, then follow how the answers return.
- Intermediate
Divide and Conquer
Split a problem into smaller pieces, solve them, and combine their answers.
- Intermediate
Backtracking
Try a choice, explore what follows, and undo it before trying another.
- Intermediate
Merge Sort
Sort smaller halves, then merge them into one ordered row.
- Intermediate
Quick Sort
Choose a pivot and sort the items on each side of it.
- Intermediate
Search Strategies and Heuristics
Compare breadth-first, depth-first, uniform-cost, and A* search.
- Intermediate
Heaps and Heap Sort
Keep the largest item at a heap's root, then use that rule to sort.
- Intermediate
Inside Transformer Attention
Extend the AI Transformer foundation with positions, attention heads, and masks.
- Intermediate
Database Replication
Copy database changes to replicas while accounting for lag and failover.
- Intermediate
Constraints and Decisions
Separate feasible assignments from preferences and uncertain outcomes.
- Intermediate
Two Pointers
Use two positions to make progress through an ordered row.
- Intermediate
From Pretraining to Instruction Tuning
Compare encoder and decoder roles and how models are adapted after pretraining.
- Intermediate
Message Queues
Hand work to background consumers without assuming exactly-once effects.
- Intermediate
From Word Counts to Embeddings
Compare bag of words, TF-IDF, and learned word vectors.
- Intermediate
Fast and Slow Pointers
Detect a linked-list cycle by moving at different speeds.
- Intermediate
Sliding Window
Reuse the work from one consecutive group when moving to the next.
- Intermediate
From Documents to Retrieved Passages
Trace chunking, vector search, hybrid retrieval, and reranking.
- Intermediate
Publish and Subscribe
Distribute an event to interested consumers with independent delivery needs.
- Intermediate
Language Models and Attention
Connect next-token prediction, sequence-to-sequence tasks, and attention.
- Intermediate
Merging Intervals
Combine overlapping closed ranges without losing coverage.
- Intermediate
Prefix Sums
Remember totals up to each position so range sums can be answered quickly.
- Intermediate
Building and Evaluating RAG Context
Measure retrieval separately from answer grounding and end-to-end usefulness.
- Intermediate
API Gateway
Route client requests through a shared entry point with clear boundaries.
- Intermediate
Cyclic Sort for Bounded Values
Place a permutation of 1 through n at its matching positions.
- Intermediate
Binary Trees and Search Trees
Explore branching nodes, traversal orders, and the ordering rule of a binary search tree.
- Intermediate
LLM Agents, Tools, and Memory
Examine a bounded tool-using workflow and distinguish context from persistent memory.
- Intermediate
Rate Limiting
Bound request rates using explicit identities, windows, and policies.
- Intermediate
In-Place Linked List Reversal
Reverse links while preserving the unvisited remainder.
- Intermediate
Representing Graphs
Describe connections between places using vertices, edges, and adjacency lists.
- Intermediate
Tree Breadth-First Search
Visit a tree level by level using a queue.
- Intermediate
Breadth-First and Depth-First Search
Explore a graph layer by layer or follow one path before returning.
- Intermediate
Tree Depth-First Search
Follow a branch before returning to its siblings.
- Intermediate
Abstract Data Types, Bags, and Deques
Separate what a collection promises from how it stores its items.
- Intermediate
Building Subsets
Grow a power set by deciding whether to include each item.
- Intermediate
Linked Lists and Resizing Arrays
Compare one-way and two-way links with an array that grows when it fills.
- Intermediate
Modified Binary Search
Find the first matching position using a shrinking boundary.
- Intermediate
Shell Sort
Sort cards far apart first, then bring the gap down to one.
- Intermediate
Merge Sort Variants
Compare recursive splits, iterative merges, and safe merge optimisations.
- Intermediate
Partitioning and Quickselect
Divide values around a pivot, then keep only the side containing a wanted rank.
- Intermediate
Priority Queues and Multiway Merge
Remove items by priority and combine several already sorted streams.
- Intermediate
Symbol Tables and Sets
Associate keys with values, or remember which keys belong to a collection.
- Intermediate
Hash Collisions: Chaining and Linear Probing
Compare two ways to keep different keys that choose the same bucket.
- Intermediate
Fisher–Yates Shuffle
Rearrange a row randomly without confusing a shuffle with a sort.
- Intermediate
Connecting DSA Foundations
Connect recursion, trees, graphs, growth notation, and a first correctness argument.
- Intermediate
Invariants and Amortised Analysis
Keep a structure's rules true and count the cost of a sequence of operations.
- Beginner
Meet Python
Meet Python, the interpreter, and the small pieces of a first program.
- Beginner
Setting Up Python
Find Python, check its version, run a file, and understand isolated environments.
- Advanced
Correct Search and Planning Trade-offs
Examine optimality, heuristic assumptions, and replanning when a model changes.
- Advanced
Bitwise XOR for Paired Values
Cancel pairs to find one unpaired integer under a precise contract.
- Advanced
Preference Alignment and Efficient Adaptation
Distinguish RLHF and DPO objectives from LoRA and QLoRA parameter-efficient updates.
- Beginner
Python Names and Values
Give values names, recognise their types, and convert user input carefully.
- Advanced
Database Sharding
Partition data across databases and examine routing and cross-shard costs.
- Advanced
Transformer Architecture: A Bridge
Trace representations, attention, position, and output without assuming factual correctness.
- Advanced
Top K with a Min-Heap
Keep the k largest values seen so far without sorting the whole input.
- Advanced
Compression and Inference Trade-offs
Compare quantisation, distillation, caching, and context limits.
- Beginner
Expressions and Operators
Combine values with arithmetic, comparisons, and logical operators.
- Advanced
Circuit Breaker
Stop repeated calls to a failing dependency and cautiously test recovery.
- Advanced
Tool Calls and Agent Workflows
Trace a proposed tool call through validation, execution, and an observed result.
- Advanced
Advanced, Graph, and Agentic RAG
Compare retrieval strategies and their evidence, cost, and security boundaries.
- Beginner
Decisions with if
Use conditions and indentation to choose which instructions run.
- Advanced
Retry with Backoff
Retry transient failures carefully with bounded delays and safe effects.
- Advanced
Agent Evaluation and MCP Boundaries
Evaluate tool-using workflows and understand the Model Context Protocol's role and limits.
- Advanced
Topological Sorting
Order tasks so each prerequisite appears before its dependent.
- Advanced
Multimodal Models and Diffusion
Trace text-conditioned image generation and examine multimodal limitations.
- Beginner
Repeating Steps with Loops
Repeat actions with for and while, and control when an iteration ends.
- Advanced
Tries and Prefixes
Share character paths while distinguishing a word from a prefix.
- Advanced
Serving Models: GPUs, Batching, and Streaming
Trace an inference request and examine latency, memory, and throughput.
- Beginner
Strings, Lists, and Tuples
Store ordered items and use positions without confusing a value with its index.
- Advanced
Dynamic Programming
Reuse overlapping subproblem answers to count step sequences.
- Beginner
Sets and Dictionaries
Keep distinct members in a set and associate keys with values in a dictionary.
- Beginner
Functions and Scope
Name a reusable job, pass information to it, and return a result.
- Beginner
Importing Python Modules
Reuse a named collection of Python tools from the standard library.
- Beginner
Text Files and Exceptions
Read a text file and report an expected problem without hiding it.
- Intermediate
Comprehensions, Nested Values, and Mutation
Build collections from existing data and reason about shared mutable objects.
- Intermediate
Arguments, Lambda, and Recursion
Understand how calls bind arguments and how recursive calls return.
- Intermediate
Classes, Objects, and Inheritance
Follow object creation, attribute lookup, and a simple inherited method.
- Intermediate
Encapsulation, Polymorphism, and Abstraction
Design small object interfaces and see how overriding changes behaviour.
- Intermediate
Exception Flow and Context Managers
Trace successful and exceptional paths while ensuring cleanup.
- Intermediate
Packages and Python Environments
Isolate dependencies and understand how project metadata and installation fit together.
- Intermediate
CSV, JSON, XML, and YAML
Choose a data format and read values without confusing text with types.
- Intermediate
Paths and Filesystem Operations
Build paths, read text, and understand when filesystem operations can fail.
- Intermediate
Python's Data Toolkit
See how NumPy, Pandas, Matplotlib, and Jupyter support different stages of exploration.
- Intermediate
Testing, Debugging, and Logging
Check a small function, investigate a failure, and report useful events.
- Expert
Multi-Agent Planning Under Uncertainty
Coordinate agents while accounting for stale information and uncertain outcomes.
- Expert
Combining Patterns and Proving Correctness
Combine sorting and two pointers while accounting for original positions and costs.
- Expert
Distributed Inference and Production Trade-offs
Compare replication, model partitioning, compression, and failure recovery.
- Advanced
Closures and Decorators
Follow a function that remembers a value and wraps another function.
- Expert
Combining System Design Patterns
Evaluate a complete request path using consistency, failure, and recovery trade-offs.
- Expert
Evaluating AI Systems in Production
Connect offline evaluation, monitored deployment, and incident response.
- Expert
Observability, Guardrails, and Agent Evaluation
Monitor a multi-step LLM workflow without treating guardrails as guarantees.
- Advanced
Iterators, Generators, and Resource Lifetimes
Trace lazy values and cleanup when an iterator or context is finished.
- Expert
Guardrails and Trustworthy Tool Use
Design layered controls around untrusted inputs, permissions, and consequential actions.
- Expert
Rigorous Generative and Agent Evaluation
Design a fair comparison and investigate failure beyond benchmark averages.
- Advanced
Multiple Inheritance and Python's Object Protocol
Trace method lookup through the MRO and understand special methods.
- Expert
Symbolic, Learned, and Hybrid AI
Compare approaches through assumptions, evidence, and failure modes.
- Expert
Alignment, Retrieval Quality, and Resource Limits
Analyse a system-wide trade-off without assuming a single alignment or retrieval method is best.
- Advanced
Properties, Dataclasses, and Abstract Classes
Model validated state, generated methods, and explicit class contracts.
- Advanced
Type Hints, Protocols, and Pattern Matching
Express type relationships and follow a structural pattern match.
- Advanced
Async Tasks, Threads, and Processes
Compare cooperative waiting, threads, and separate processes without promising an execution order.
- Advanced
Binary Data, Pickle, and Distribution
Distinguish bytes from text, understand pickle trust, and follow a package build.
- Advanced
Scientific Python: Visualisation and Mathematics
Compare Seaborn, SciPy, and SymPy through a small scientific workflow.
- Advanced
Models, Inference, and pytest
Contrast predictive modelling and statistical inference, then test a small function.
- Advanced
APIs, Validation, and Python Web Frameworks
Follow a request through validation and a prepared response.
- Advanced
SQLAlchemy and Database Boundaries
Follow a transaction while keeping data access separate from the static site.
- Advanced
Maintainable Python Design and Testing
Separate responsibilities and test the boundary between collaborating parts.
- Expert
Descriptors and Attribute Lookup
Trace how a descriptor controls attribute access for an instance.
- Expert
Metaclasses and Introspection
Inspect a class and see when its metaclass validates its definition.
- Expert
References, Memory, and Garbage Collection
Follow references to a shared object and distinguish reachability from collection timing.
- Expert
Profiling and Performance Decisions
Measure a real workload before choosing an optimisation.
- Expert
Concurrency Correctness and Shared State
Protect a shared invariant and reason about failures and cancellation.
- Expert
Types, API Contracts, and Deployment
Preserve a callable's type relationship and design stable release boundaries.
- Expert
Security Boundaries in Python Systems
Validate at trust boundaries and design explicit failure handling.
- Expert
Tensors and Automatic Differentiation
Compare a small gradient in PyTorch, TensorFlow, and JAX.
- Expert
Transformers as a Python Ecosystem Bridge
Follow token IDs and masks through a small transformer model without downloading weights.
- Beginner
Tables, Keys, and Missing Values
Read a relational table and distinguish a key from a missing value.
- Beginner
Reading Data with SELECT
Filter, order, rename, and limit rows in a prepared PostgreSQL query.
- Beginner
Changing Rows and Using Transactions
Follow inserts, updates, deletes, and a rollback using fictional data.
- Intermediate
Relationships, Constraints, and Normalisation
Connect books to authors while protecting the relationships between records.
- Intermediate
Combining Tables with Joins
Compare matching rows with an outer join that retains unmatched books.
- Intermediate
Grouping and Aggregating Rows
Summarise books by author without confusing missing values and empty groups.
- Intermediate
Asking Questions with Subqueries
Use an inner query to compare each book with the average known page count.
- Intermediate
Reusable Queries with Views
Follow a view as its underlying rows change inside a transaction.
- Intermediate
Transactions and Consistent Changes
Follow a two-account transfer through commit and reason about failure.
- Advanced
Indexes and Their Trade-offs
Understand when an index can help and what it costs to maintain.
- Advanced
Reading and Measuring Query Plans
Read a plan as an estimate and measure carefully before tuning.
- Advanced
Structuring Queries with CTEs
Name intermediate query results without assuming a fixed execution strategy.
- Advanced
Window Functions and Ranking
Rank rows within groups while preserving individual rows.
- Advanced
JSONB and PostgreSQL-Specific SQL
Distinguish missing JSON keys from JSON null and SQL NULL.
- Advanced
MVCC and Transaction Isolation
Compare statement and transaction snapshots through a prepared two-session schedule.
- Advanced
Roles and Least-Privilege Access
Separate object permissions and understand the limits of a revoke.
- Advanced
Backups and Recovery Verification
Distinguish an archive from a tested recovery process.
- Expert
Locks, Deadlocks, and Safe Retries
Trace a wait-for cycle and recover safely from a failed transaction.
- Expert
Isolation Anomalies and Write Skew
See why stable snapshots do not automatically protect cross-row rules.
- Expert
Tuning Queries Against a Workload
Evaluate a candidate index using representative reads and writes.
- Expert
Partitioning and Pruning
Route date ranges and evaluate partition pruning and its trade-offs.
- Expert
Replication Lag and Failover
Follow a committed change across an asynchronous standby failure.
- Expert
Recovery Testing and Data Integrity
Compare a restored point with independent integrity expectations and recovery objectives.
Modules and roadmaps
- 16 published concepts
Artificial Intelligence
Explore agents, search, language, reasoning, and responsible AI systems.
- 18 published concepts
Coding Patterns in Python
Learn reusable DSA problem-solving techniques with illustrative Python examples.
- 38 published concepts
Data Structures and Algorithms
Explore DSA from foundations to expert topics. Published lessons begin with algorithms, arrays, sorting, and search.
- 23 published concepts
Databases and SQL with PostgreSQL
Understand relational data, SQL, and PostgreSQL through clear, prepared examples.
- 18 published concepts
Generative AI and LLMs
Understand generative models, language models, retrieval, and agents.
- 42 published concepts
Python Programming
Understand Python from its fundamentals to engineering practices.
- 12 published concepts
System Design Patterns
Explore ten practical distributed-system patterns and their trade-offs through two scenarios each.
- Planned
Data Analysis and EDA
Ask useful questions of data and understand what the evidence shows.
- Planned
Deep Learning
Understand neural networks, their mathematics, and their applications.
- Planned
Machine Learning
Learn how models find patterns and how to evaluate their limits.
- Planned
Mathematics
The language of patterns, quantities, change, and uncertainty.
