CSC645 Algorithm Visualizer

Master algorithms through interactive visualizations and detailed notes

Complexity AnalysisSorting AlgorithmsSearching AlgorithmsGraph AlgorithmsDynamic ProgrammingGreedy AlgorithmsDivide & ConquerBrute ForceTree AlgorithmsNumber TheoryGraph TraversalAlgorithm Analysis

Showing 30 of 30 topics

★★★
Big-O, Big-Omega, Big-Theta
Master asymptotic notation: upper bounds (Big-O), lower bounds (Big-Omega), and tight bounds (Big-Theta). Understand formal definitions and how to derive them.
complexity
★★★
Complexity from Loops & Summations
Learn to analyze nested loops using summations. Derive Big-O from loop structures and understand how to compute runtime scaling.
variescomplexity
★★★
Recurrence Relations & Master Theorem
Solve recurrences using forward/backward substitution and the Master Theorem. Analyze divide-and-conquer algorithm runtimes.
variescomplexity
★★★
Brute Force — Definition & Examples
Understand the brute force paradigm: exhaustively enumerate all candidates and select the best. Analyze why it's a valid (but slow) strategy.
O(n!)brute force
★★★
TSP — Exhaustive Search
Traveling Salesman Problem solved by exhaustive search. Visualize permutation enumeration and understand why n! grows so fast.
O(n!)brute force
★★★
Assignment Problem — Exhaustive Search
Solve the assignment problem via exhaustive enumeration. Understand cost matrices and permutation-based solution search.
O(n!)brute force
★★★
Divide & Conquer — Definition & Examples
Master the divide-and-conquer paradigm: divide, conquer, combine. See how it enables O(n log n) algorithms from O(n²) problems.
variesdivide conquer
★★★
Merge Sort
The classic divide-and-conquer sorting algorithm. Understand the split-merge process and why it achieves optimal O(n log n) time.
O(n log n)divide conquer
★★★
Quick Sort
The most widely used sorting algorithm. Master pivot selection, partitioning, and understand why it's O(n²) worst-case but O(n log n) average.
O(n log n) avg, O(n²) worstdivide conquer
★★★
Closest Pair — Brute Force vs D&C
Compare brute force O(n²) against divide-and-conquer O(n log n). Visualize point partitioning and the critical strip check.
O(n log n)divide conquer
★★★
Greedy Algorithms — Definition & Examples
Learn the greedy paradigm: make the locally optimal choice at each step. Understand when greed works and when it fails.
variesgreedy
★★★
Coin Change — Greedy Approach
See the greedy coin change algorithm in action. Understand when the greedy approach works and when it fails compared to DP.
O(n log n)greedy
★★★
Huffman Coding
Build optimal prefix-free codes using a greedy frequency-based approach. Visualize tree construction and compression savings.
O(n log n)greedy
★★★
Dynamic Programming — Definition & Examples
Master the DP paradigm: optimal substructure and overlapping subproblems. Understand memoization vs tabulation.
variesdp
★★★
0/1 Knapsack — DP Solution
Solve the 0/1 knapsack problem with dynamic programming. Visualize the DP table and understand the recurrence relation.
O(n·W)dp
★★★
Coin Change — DP Solution
Solve coin change with DP and compare against the greedy approach. See why DP guarantees optimality when greedy doesn't.
O(n·amount)dp
★★★
Linear Search
The simplest search algorithm. Scan each element sequentially until the target is found. Best case O(1), worst case O(n).
O(n)searching
★★★
Binary Search
The efficient search for sorted arrays. Halve the search space at each step to find the target in logarithmic time.
O(log n)searching
★★★
Bubble Sort
The simplest (but slowest) sorting algorithm. Repeatedly swap adjacent elements that are out of order. Good for understanding sorting fundamentals.
O(n²)sorting
★★
Prim's Algorithm
Build a Minimum Spanning Tree by growing from a single vertex. Use a priority queue to always add the cheapest edge crossing the cut.
O(E log V)graph
★★
Kruskal's Algorithm
Build a Minimum Spanning Tree by processing edges in order of weight. Use Union-Find to efficiently detect cycles.
O(E log E)graph
★★
Dijkstra's Algorithm
Find shortest paths from a single source to all other vertices. The classic greedy graph algorithm using a priority queue.
O(E log V)graph
★★
Floyd-Warshall Algorithm
All-pairs shortest paths in one elegant DP algorithm. Three nested loops over k, i, j — deceptively simple but powerful.
O(V³)graph
★★
Warshall's Transitive Closure
Compute the transitive closure of a directed graph: which vertices are reachable from which. A simplified Floyd-Warshall on boolean matrices.
O(V³)graph
BFS & DFS Graph Traversal
Breadth-First Search (queue) and Depth-First Search (stack/recursion). The fundamental building blocks of most graph algorithms.
O(V + E)traversal
Binary Tree Traversals
Master in-order, pre-order, and post-order traversals. Understand when to use each and their relationship to expression trees.
O(n)trees
Euclid's GCD Algorithm
The ancient algorithm for Greatest Common Divisor. Deceptively simple: gcd(a,b) = gcd(b, a mod b). Understand why it's logarithmic.
O(log min(a,b))number theory
Primality Checking
Determine if a number is prime. Trial division up to √n — understand why this is the naive bound and how to improve it.
O(√n)number theory
Empirical vs Theoretical Analysis
Compare theoretical Big-O predictions with actual runtime measurements. Understand machine-dependent vs machine-independent analysis.
analysis
Data Structures Impact on Performance
How the choice of data structure affects algorithm performance. Array vs Linked List vs Hash Table — operation-by-operation comparison.
variesanalysis