Topics
21 concepts so far, grouped into eight tracks. Read them in order, or jump to the one you need.
1 Foundations
- 1.4Recursion(read)Step through
A function that solves a problem by calling itself on a smaller version of the same problem.
- Variables and types · soon
- Control flow · soon
- Functions · soon
2 Data structures
- 2.1Arrays(read)Step through
Values stored side by side in memory, so any position can be reached directly by its index.
- 2.2Stacks and queues(read)Step through
Two ways to hold items in order: a stack gives back the newest item first, a queue the oldest.
- 2.3Linked lists(read)Sandbox
A chain of nodes where each one holds a value and a pointer to the next, so items can be added without shifting anything.
- 2.4Hash maps(read)Step through
Store values under keys, using a hash of each key to jump straight to where it lives.
- 2.5Binary search trees(read)Sandbox
A tree where every node's left side holds smaller values and its right side holds larger ones, so a search can skip half the tree at each step.
- 2.6Heaps(read)Sandbox
A tree where every parent is smaller than its children, kept in an array, so the minimum is always at the front.
3 Algorithms
- 3.1Big O(read)Sliders
A way to describe how an algorithm's work grows as its input grows, ignoring constant factors.
- 3.2Binary search(read)Step through
Find a value in a sorted list by checking the middle and throwing away the half it can't be in.
- 3.3Bubble sort(read)Playground
Walk the list swapping neighbours that are out of order; each pass carries the largest remaining value to the end.
- 3.4Insertion sort(read)Playground
Grow a sorted section at the front, sliding each new value left until it fits.
- 3.5Merge sort(read)Playground
Split the list in half, sort each half, then merge the two sorted halves into one.
- 3.6Quicksort(read)Playground
Pick a pivot, move every smaller value to its left, then sort each side the same way.
- 3.7Comparing sorting algorithms(read)Race
No sort is fastest everywhere. The best choice depends on the input's size and order, and on whether you need stability or little memory.
- 3.8Graph traversal(read)Explorer
Visit every node you can reach from a start node, using a queue to go wide first or a stack to go deep first.
- 3.9Dijkstra's algorithm(read)Explorer
Find the shortest distance from one node to every other by always settling the closest node not yet settled.
4 Paradigms
- Objects and classes · soon
- Functional programming · soon
- Closures · soon
5 Memory
- 5.1Stack vs heap(read)Step through
Two places a running program keeps data: the stack holds each call's own variables and is freed when the call returns; the heap holds data that has to outlive a call.
- 5.2Pointers and references(read)Step through
A reference (or pointer) is a value that says where some data lives instead of holding the data itself, so two variables can share one object.
- 5.3Garbage collection(read)Step through
Automatic memory management that finds objects the program can no longer reach and frees them, so you never call free yourself.
6 Concurrency
- 6.2Async and await(read)Step through
A way to write code that waits (for the network, a disk, a timer) without blocking: await pauses the function and lets other work run until the result is ready.
- 6.3Race conditions(read)Replay
A bug where the result depends on the timing of threads or tasks that share data, so the same code is right on one run and wrong on the next.
- Threads · soon
7 Design
- SOLID · soon
- Design patterns · soon
- Dependency injection · soon
8 Tools
- Compilers · soon
- Git · soon
- Testing · soon
- HTTP and APIs · soon