Explore
101 visualisers you can step through forwards and backwards, with synced code and a reason for every move.
Showing 101 of 101
Pastel = track · chip = your mastery
- LinearArrayA collection of elements stored at contiguous memory locations.O(n)
- LinearStackA linear data structure that follows LIFO (Last In First Out) principle.O(1)
- LinearQueueA linear data structure that follows FIFO (First In First Out) principle.O(1)
- LinearLinked ListA linear data structure where elements are stored in nodes.O(n)
- LinearDequeA double-ended queue that allows insertion and deletion at both ends.O(1)
- HierarchicalBinary Search TreeA binary tree where every left subtree holds smaller keys and every right subtree larger ones.O(log n)
- HierarchicalAVL TreeA self-balancing binary search tree that maintains height balance.O(log n)
- HierarchicalB-TreeA self-balancing tree data structure that maintains sorted data.O(log n)
- HierarchicalHeapA specialized tree-based data structure that satisfies the heap property.O(log n)
- HierarchicalUnion-FindDisjoint sets as a forest: union joins two trees, find walks to the root, and path compression flattens the way.O(α(n))
- HierarchicalTrie (Prefix Matching)A tree data structure used for efficient prefix matching.O(m)
- Graph-BasedGraphA non-linear data structure consisting of vertices and edges.O(V + E)
- Graph-BasedAdjacency ListA collection of lists used to represent a graph.O(deg(v))
- Graph-BasedAdjacency MatrixA 2D matrix used to represent a graph.O(1)
- Hash-BasedHash TableA data structure that maps keys to values using a hash function.O(1)
- Hash-BasedBloom FilterA compact bit array that answers "definitely not in the set" or "probably in the set".O(k)
- Hash-BasedHash SetA data structure that stores unique elements using a hash function.O(1)
- SortingBubble SortA simple sorting algorithm that repeatedly steps through the list.O(n²)
- SortingSelection SortA sorting algorithm that divides the input into sorted and unsorted regions.O(n²)
- SortingInsertion SortA sorting algorithm that builds the final sorted array one item at a time.O(n²)
- SortingMerge SortA divide-and-conquer algorithm that recursively breaks down the problem.O(n log n)
- SortingQuick SortA divide-and-conquer algorithm that picks an element as a pivot.O(n log n)
- SortingHeap SortA comparison-based sorting algorithm that uses a binary heap.O(n log n)
- SortingCounting SortA sorting algorithm that counts the occurrences of each element.O(n + k)
- SortingRadix SortA non-comparative sorting algorithm that sorts data with integer keys.O(d·(n + b))
- SearchingLinear SearchA simple search algorithm that checks each element in sequence.O(n)
- SearchingBinary SearchA search algorithm that finds the position of a target value in a sorted array.O(log n)
- SearchingJump SearchA search algorithm for sorted arrays that jumps ahead by fixed steps.O(√n)
- SearchingInterpolation SearchA search for sorted arrays that estimates where the target should be from its value.O(log log n)
- SearchingExponential SearchA search algorithm that finds the range where element is present.O(log n)
- SearchingFibonacci SearchA search algorithm that uses Fibonacci numbers to search in sorted arrays.O(log n)
- GraphBreadth-First SearchA graph traversal algorithm that explores all vertices at the present depth.O(V + E)
- GraphDepth-First SearchA graph traversal algorithm that explores as far as possible along each branch.O(V + E)
- GraphDijkstra's AlgorithmAn algorithm for finding the shortest paths between nodes in a graph.O((V + E) log V)
- GraphBellman-Ford AlgorithmAn algorithm that computes shortest paths from a source vertex to all other vertices.O(VE)
- GraphFloyd-Warshall AlgorithmAn algorithm for finding shortest paths in a weighted graph with positive or negative edge weights.O(V³)
- GraphPrim's AlgorithmA greedy algorithm that finds a minimum spanning tree for a weighted undirected graph.O(E log V)
- GraphKruskal's AlgorithmA minimum-spanning-tree algorithm that finds an edge of the least possible weight.O(E log E)
- GraphTopological SortA linear ordering of vertices such that for every directed edge uv, vertex u comes before v.O(V + E)
- GraphKosaraju's AlgorithmAn algorithm for finding strongly connected components of a directed graph.O(V + E)
- GraphTarjan's AlgorithmAn algorithm for finding strongly connected components of a directed graph.O(V + E)
- GreedyKnapsack (Greedy)A greedy approach to solve the fractional knapsack problem.O(n log n)
- GreedyActivity SelectionA greedy algorithm to select the maximum number of activities that can be performed.O(n log n)
- Dynamic ProgrammingFibonacci (Memoization)An optimized approach to calculate Fibonacci numbers using memoization.O(n)
- Dynamic Programming0/1 KnapsackA dynamic programming solution to the 0/1 knapsack problem.O(nW)
- Dynamic ProgrammingLongest Common SubsequenceFinds the longest subsequence present in both strings.O(mn)
- Dynamic ProgrammingEdit DistanceCalculates the minimum number of operations to convert one string to another.O(mn)
- Dynamic ProgrammingCoin ChangeThe fewest coins that add up to an amount, built up from every smaller amount.O(nA)
- Dynamic ProgrammingLongest Increasing SubsequenceThe longest run of values that rises from left to right, not necessarily adjacent.O(n²)
- Dynamic ProgrammingGrid PathsCount the paths across a grid moving only right or down, around obstacles.O(mn)
- Dynamic ProgrammingHouse RobberThe largest total from values where no two chosen ones are neighbours.O(n)
- BacktrackingN-Queens ProblemA backtracking algorithm to place N queens on an N×N chessboard.O(N!)
- BacktrackingSudoku SolverA backtracking algorithm to solve a Sudoku puzzle.O(9^m)
- BacktrackingSubsetsList every subset by deciding, for each item in turn, to include it or leave it out.O(n·2ⁿ)
- BacktrackingPermutationsList every ordering by choosing an unused item for each position, then undoing the choice.O(n·n!)
- String MatchingRabin-Karp AlgorithmA string searching algorithm that uses hashing to find patterns.O(n + m)
- String MatchingKMP AlgorithmThe Knuth-Morris-Pratt algorithm for efficient string matching.O(n + m)
- String MatchingZ-AlgorithmAn algorithm for finding all occurrences of a pattern in a string.O(n + m)
- String MatchingManacher's AlgorithmAn algorithm to find the longest palindromic substring in linear time.O(n)
- PatternsTwo PointersFind a pair with a given sum in a sorted array by moving one pointer from each end.O(n)
- PatternsSliding WindowFind the best run of k consecutive values by sliding a window and updating one running sum.O(n)
- PatternsMonotonic StackFind the next greater value for every element with a stack that stays in decreasing order.O(n)
- PatternsMerge IntervalsSort intervals by start, then sweep once, merging each one that overlaps the last.O(n log n)
- PatternsMeeting RoomsThe fewest rooms that fit every meeting: sweep by start time and reuse rooms as they free up.O(n log n)
- Linear AlgebraLinear TransformationsSee a 2×2 matrix move the whole plane: its columns are where î and ĵ land, and its determinant scales area.
- Linear AlgebraEigenvectorsSweep a vector around the circle to find the directions a matrix only stretches: A·v = λ·v.
- Linear AlgebraSVD Image CompressionRebuild a picture from its singular value decomposition one rank-1 piece at a time, and see how few pieces most images need.
- CalculusDerivativesShrink a secant line until it becomes the tangent, then trace the slope at every point to draw f′.
- CalculusThe Chain Rule (Backpropagation)Run a computation graph forward, then push gradients back node by node: local derivative times upstream gradient.
- OptimizationGradient DescentWalk downhill on a contour map by stepping against the gradient, and see what the step size does.
- OptimizationMomentum and AdamRace gradient descent, momentum, RMSProp and Adam on the same surface, from the same start.
- ProbabilityBayes' RuleUpdate a belief with evidence by drawing everyone as a square: the answer is the share of the evidence strip where the hypothesis holds.
- ProbabilityCentral Limit TheoremAverage samples from any population, flat, skewed or split in two, and watch the averages pile up into a bell curve whose spread shrinks like σ/√n.
- Information TheoryEntropy and KL DivergenceMeasure information as surprise in bits, then see what believing the wrong distribution costs: cross-entropy and KL divergence.
- Numerical MethodsFloating-Point NumbersSee how a float32 packs a sign, an exponent and 23 fraction bits, why 0.1 is not stored exactly, and how far apart neighbouring floats are.
- Machine LearningLinear RegressionFit a line by gradient descent on the mean squared error, with every residual drawn as a real square, then compare with the exact least-squares line. Drag the points to change the data.
- Machine LearningLogistic RegressionTrain a single sigmoid neuron on the cross-entropy: watch the probability regions sharpen and the boundary swing into place, and see why it can't separate XOR or circles.
- Machine LearningK-Means ClusteringGroup points by alternating two steps, joining the nearest centroid and moving centroids to their means, and see where k-means finds the right clusters and where it gets stuck.
- Machine LearningPerceptronWatch a single neuron learn a line by nudging it towards every point it gets wrong, and see why it stops on separable data but never on XOR.
- Machine LearningDecision TreesGrow a decision tree one question at a time, choosing each split to make the regions as pure as possible, and see where deep trees start to overfit.
- Machine LearningGradient BoostingBuild a strong model from tiny trees: each round fits a one-split stump to what the model still gets wrong and adds a shrunk copy of it.
- Machine LearningNeural Network PlaygroundTrain a small neural network on XOR, circles or moons and watch hidden layers bend a straight decision boundary into a curve, with every weight drawn as it changes.
- Deep LearningConvolutionSlide a 3×3 kernel over a picture to build a feature map, then apply ReLU and max-pooling: how a CNN finds edges.
- Language ModelsByte-Pair EncodingLearn a tokenizer from text: glue the most frequent pair of neighbours into a new token, merge after merge, then split a word it never saw.
- Language ModelsAttentionWatch a query score every key, softmax turn the scores into weights, and the output blend the values; drag the query to steer it.
- Language ModelsSampling and TemperatureTurn a language model’s logits into one next word: softmax with temperature, top-k and top-p cuts, and a random draw.
- Language ModelsKV CacheGenerate text token by token and see why caching keys and values turns each step from recomputing everything into one new row.
- Reinforcement LearningQ-LearningAn agent learns a gridworld from rewards alone: watch Q-values spread back from the goal, the greedy arrows settle, and the discount decide between a near and a far reward.
- Generative ModelsDiffusion ModelsNoise a cloud of points into a blob, then watch a trained denoiser turn fresh noise back into the shape, one small step at a time.
- Operating SystemsCPU SchedulingWatch FCFS, SJF, SRTF, round robin and priority share one CPU on a Gantt chart: who waits, for how long, and what each switch costs.
- CachingLRU and LFU CachesGet and put keys in a fixed-size cache and watch the hash map and the recency (or use-count) list stay in step, evicting in O(1) when it is full.
- Operating SystemsPage ReplacementRun a string of page references through a few frames of memory under FIFO, LRU, Clock and the optimal OPT, and count the faults, including Bélády’s anomaly.
- Distributed SystemsConsistent HashingSpread keys over servers on a hash ring: each key belongs to the first server clockwise, so adding or removing a server moves only about 1/N of the keys, and virtual nodes even out the load.
- PerformanceQueueing and Tail LatencyWatch random requests queue in front of servers, see why latency explodes as load nears 100%, and why p99 matters more than the average.
- PerformanceToken Bucket Rate LimiterA bucket of tokens that refills at a steady rate: bursts up to its capacity get through, but the long-run rate is capped.
- Distributed SystemsLogical ClocksStamp events on a space-time diagram with Lamport and vector clocks, and see why a smaller Lamport time doesn’t mean “happened before”, while vector clocks spot concurrent events exactly.
- Distributed SystemsRaft ConsensusElect a leader, replicate a log and commit by majority, then crash servers and split the network to see why Raft never loses a committed entry.
- DatabasesB+ TreeThe index inside databases: keys live in linked leaves, separator copies above steer each lookup to one page per level, and range scans walk along the leaves.
- DatabasesLSM TreeWrite keys into a memtable, flush it to sorted tables on disk and watch compaction merge them down the levels; then follow a get from newest to oldest, skipping tables by key range and Bloom filter.
- ConcurrencyRace ConditionsTwo threads run count++ one instruction at a time: watch an update get lost, then try every interleaving and see how often it happens, and how a lock or an atomic instruction fixes it.
- ConcurrencyDeadlockProcesses take locks in turn: watch the resource-allocation graph grow, find the cycle that is a deadlock, and see how taking locks in one global order prevents it, with dining philosophers.