Algo Visualization Cheat Sheet
All algorithm code on this site is accompanied by visualizations. This page only displays a small selection of classic data structures and algorithms to allow readers to quickly review them when forgotten, using visualizations to deepen understanding.
For more algorithm visualizations, refer to this site's algorithm tutorials and exercise sets, which are not listed here individually.
Classic Techniques for Linked List Algorithms
Two Pointers: Merging/Splitting Linked Lists
For a detailed analysis, see Summary of Linked List Two Pointer Techniques.
Two Pointers: Fast and Slow Pointers
For a detailed analysis, see Summary of Linked List Two-Pointer Techniques.
Two Pointers: Interleaving Pointers
For a detailed analysis, see Summary of Linked List Two-Pointer Techniques.
Determine Palindrome in a Singly Linked List
For a detailed analysis, see Determine Palindrome in a Singly Linked List.
Classic Techniques in Array Algorithms
Two Pointers
For a detailed analysis, see Summary of Two Pointers Techniques. More exercises and visualizations on two pointers can be found in the Two Pointers Exercise Set.
Circular Array Techniques
For a detailed analysis, see Circular Array Techniques.
Binary Search Algorithm
For a detailed analysis, refer to Summary of Binary Search Techniques. For more exercises and visualizations related to the binary search algorithm, see Binary Search Problem Set.
Sliding Window Algorithm
For a detailed analysis, see Sliding Window Techniques Summary. For more applications and visualizations of the sliding window algorithm, refer to Sliding Window Exercises Collection.
Prefix Sum Technique
For detailed analysis, refer to Prefix Sum Technique.
Differential Array Technique
For a detailed analysis, see Differential Array Technique.
Techniques for Traversing a 2D Array
For a detailed analysis, refer to Fancy Techniques for Traversing a 2D Array.
Top Ten Sorting Algorithms
For a detailed analysis, see Detailed Explanation of the Top Ten Sorting Algorithms.
Classic Techniques for Binary Tree Algorithms
Traversal of Binary Trees
For a detailed analysis, see DFS/BFS Traversal of Binary Trees.
Traversal of Multi-way Trees
For detailed analysis, see Basics and Traversal of Multi-way Trees.
Derivative Structures of Binary Trees
Binary Search Tree
For a detailed analysis, refer to The Essence of Binary Search Trees (Features) as well as the BST series tutorials and exercises.
Self-Balancing Red-Black Binary Search Tree
For detailed analysis, refer to Basics of Red-Black Trees.
Binary Heap
For a detailed analysis, refer to Binary Heap Basics, Implementing Priority Queue with Binary Heap, and Heap Sort with Binary Heap.
Trie Tree
For a detailed analysis, see Basics of Trie Tree and Trie Tree Code Implementation.
Segment Tree
For a detailed explanation, see Segment Tree Basics.
Classic Graph Algorithms
Underlying Implementation of Graphs
For a detailed analysis, see Basic Graph Structures and General Implementation.
Graph Traversal
For a detailed analysis, see Graph Traversal.
Bipartite Graph Detection Algorithm
For a detailed analysis, see Bipartite Graph Algorithm.
Cycle Detection Algorithm
For a detailed analysis, see Topological Sorting and Cycle Detection Algorithm.
Topological Sorting Algorithm
For a detailed analysis, see Topological Sorting and Cycle Detection Algorithm.
Union-Find Algorithm
For a detailed analysis, see Union-Find Algorithm.
Minimum Spanning Tree Algorithm
For detailed analysis, refer to Kruskal's Algorithm and Prim's Algorithm.
Shortest Path Algorithm
For a detailed analysis, see Dijkstra's Algorithm.
Classic Backtracking Algorithm
For detailed analysis, see Backtracking Algorithm for Permutations/Combinations/Subsets.
More visualizations are being updated.