AlgoViz by Pixel Sorters INC. is a cutting-edge algorithm visualization platform built to help students, teachers, and coding enthusiasts explore how algorithms actually work — step by step, line by line, and bar by bar.
Watch sorting and searching algorithms unfold in real-time with interactive animations powered by GSAP.
Compare algorithm performance using Big O complexity insights and live dataset interactions.
Explore and compare algorithm implementations in Python, Java, and JavaScript — side by side, organized, and easy to follow.
Created by passionate Computer Science students from Frostburg State University to make learning algorithms fun, clear, and engaging.
Adjust dataset size, animation speed, and choose algorithms directly on the page — no reloading required.
Completely free to use and open for all learners. Access algorithm animations anytime, anywhere, without downloads or logins.
📲 Tap the visualizer to go fullscreen
Short and simple description to turn code and diagrams into understandable information
Binary Search is an efficient search algorithm used to find a specific value in a sorted list. It repeatedly divides the list in half, comparing the target with the middle element. If the target is smaller, the search continues in the left half; if larger, in the right half. This continues until the value is found or the range is empty.
Bubble Sort repeatedly compares each pair of adjacent items and swaps them if they are out of order. This process continues until no swaps are needed, meaning the list is sorted. The largest values “bubble up” to the end with each pass.
Insertion Sort builds a sorted list one element at a time by inserting each new element into its proper position among the already-sorted items, similar to sorting playing cards in your hand.
Linear Search checks each element in the list one by one from start to finish. It works on both sorted and unsorted data but can be slow on large datasets because it may need to check every element.
Quick Sort uses a divide-and-conquer strategy by selecting a pivot and partitioning the array into elements less than and greater than the pivot. It recursively sorts each partition until the whole array is sorted.
Selection Sort divides the array into a sorted and unsorted region. It repeatedly finds the smallest element in the unsorted region and swaps it with the first unsorted position. It uses few swaps but still performs many comparisons.
Disclaimer: The following code examples were generated with the assistance of AI tools and are intended for educational and illustrative purposes only. While they demonstrate core algorithm concepts, minor syntax or logic differences may occur between programming languages. Please review and test before using them in your own projects.
def selection_sort(arr):
for i in range(len(arr)):
min_index = i
for j in range(i + 1, len(arr)):
if arr[j] < arr[min_index]:
min_index = j
arr[i], arr[min_index] = arr[min_index], arr[i]
return arr
def bubble_sort(arr):
n = len(arr)
for i in range(n):
for j in range(0, n-i-1):
if arr[j] > arr[j+1]:
arr[j], arr[j+1] = arr[j+1], arr[j]
def insertion_sort(arr):
for i in range(1, len(arr)):
key = arr[i]
j = i-1
while j >= 0 and arr[j] > key:
arr[j+1] = arr[j]
j -= 1
arr[j+1] = key
def binary_search(arr, target):
left, right = 0, len(arr) - 1
while left <= right:
mid = (left + right) // 2
if arr[mid] == target:
return mid
elif arr[mid] < target:
left = mid + 1
else:
right = mid - 1
return -1
def quick_sort(arr):
if len(arr) <= 1:
return arr
pivot = arr[len(arr)//2]
left = [x for x in arr if x < pivot]
middle = [x for x in arr if x == pivot]
right = [x for x in arr if x > pivot]
return quick_sort(left) + middle + quick_sort(right)
def linear_search(arr, target):
for i in range(len(arr)):
if arr[i] == target:
return i
return -1
void selectionSort(int[] arr) {
for (int i = 0; i < arr.length; i++) {
int minIndex = i;
for (int j = i + 1; j < arr.length; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}
int temp = arr[i];
arr[i] = arr[minIndex];
arr[minIndex] = temp;
}
}
void bubbleSort(int[] arr) {
int n = arr.length;
for(int i = 0; i < n; i++) {
for(int j = 0; j < n-i-1; j++) {
if(arr[j] > arr[j+1]) {
int temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
}
void insertionSort(int[] arr) {
for(int i = 1; i < arr.length; i++) {
int key = arr[i];
int j = i - 1;
while(j >= 0 && arr[j] > key) {
arr[j+1] = arr[j];
j--;
}
arr[j+1] = key;
}
}
int binarySearch(int[] arr, int target) {
int left = 0, right = arr.length - 1;
while(left <= right) {
int mid = left + (right - left) / 2;
if(arr[mid] == target)
return mid;
else if(arr[mid] < target)
left = mid + 1;
else
right = mid - 1;
}
return -1;
}
void quickSort(int[] arr, int low, int high) {
if (low < high) {
int pi = partition(arr, low, high);
quickSort(arr, low, pi - 1);
quickSort(arr, pi + 1, high);
}
}
int partition(int[] arr, int low, int high) {
int pivot = arr[high];
int i = (low - 1);
for (int j = low; j < high; j++) {
if (arr[j] <= pivot) {
i++;
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
int temp = arr[i + 1];
arr[i + 1] = arr[high];
arr[high] = temp;
return i + 1;
}
int linearSearch(int[] arr, int target) {
for (int i = 0; i < arr.length; i++) {
if (arr[i] == target)
return i;
}
return -1;
}
function selectionSort(arr) {
for (let i = 0; i < arr.length; i++) {
let minIndex = i;
for (let j = i + 1; j < arr.length; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}
[arr[i], arr[minIndex]] = [arr[minIndex], arr[i]];
}
return arr;
}
function bubbleSort(arr) {
for(let i = 0; i < arr.length; i++) {
for(let j = 0; j < arr.length - i - 1; j++) {
if(arr[j] > arr[j+1]) {
[arr[j], arr[j+1]] = [arr[j+1], arr[j]];
}
}
}
}
function insertionSort(arr) {
for(let i = 1; i < arr.length; i++) {
let key = arr[i];
let j = i - 1;
while(j >= 0 && arr[j] > key) {
arr[j+1] = arr[j];
j--;
}
arr[j+1] = key;
}
}
function binarySearch(arr, target) {
let left = 0, right = arr.length - 1;
while(left <= right) {
let mid = Math.floor((left + right) / 2);
if(arr[mid] === target)
return mid;
else if(arr[mid] < target)
left = mid + 1;
else
right = mid - 1;
}
return -1;
}
function quickSort(arr) {
if (arr.length <= 1) return arr;
const pivot = arr[arr.length - 1];
const left = arr.filter(x => x < pivot);
const right = arr.filter(x => x > pivot);
const equal = arr.filter(x => x === pivot);
return [...quickSort(left), ...equal, ...quickSort(right)];
}
function linearSearch(arr, target) {
for (let i = 0; i < arr.length; i++) {
if (arr[i] === target)
return i;
}
return -1;
}
Pixel Sorters Inc. is a dedicated team of aspiring software engineers passionate about creating educational tools for programmers. Our project, AlgoViz, brings algorithms to life through visualization, helping learners better understand how code behaves step by step.
Maliyah Bolen is a sophomore at Frostburg State University majoring in Computer Information Systems with a minor in Data Science. In high school, she studied Interactive Media Production, where she first learned to code games in unity using C#. Nowadays, she is growing her technical skills and knowledge on campus. As Scrum Master, she’s thrilled to be a valuable guide for her team, promoting collaboration to ensure our team will efficiently build an interactive and educational website efficiently.
Donald Ruths is an aspiring software engineer pursuing a degree in Computer Science at Frostburg University. What started as a curiosity for code in his teenage years quickly grew into a passion for building and problem-solving through technology. Donald thrives on turning complex ideas into clean, functional solutions, and as a Product Owner, he focuses on the “big picture” defining what success looks like, aligning goals with user needs, and making sure the finished product delivers real impact. With a strong mix of technical skills and forward-thinking vision, Donald is eager to bring creativity, precision, and drive into this finished product.
Jacob Beeman is a junior at Frostburg State University majoring in Computer Science and developed a passion for software engineering through coding Lego robots as a child. As Development Team Lead, he focuses on designing and implementing core features, guiding the development process, and ensuring the team delivers a high-quality, functional product. He enjoys solving technical challenges and creating software that helps users learn and understand complex concepts.
Quick definitions to help new users understand common terms used in AlgoViz.
A step-by-step set of instructions to perform a task such as sorting or searching.
A search algorithm that efficiently finds a target value in a sorted dataset by repeatedly dividing the search range in half.
A simple sorting algorithm that compares and swaps adjacent elements until the dataset is sorted.
A measure of the efficiency of an algorithm, usually expresses using expressed using Big O notation (e.g., O(n), O(n^2)). It indicates how the algorithm’s performances change as the dataset size increases in terms of time or space usage.
A structured collection of data values that an algorithm processes. In Algoviz, datasets are visually represented (such as bars or nodes) and are sorted or searched to demonstrate how algorithms function.
Small circular graphical elements that represent individual data points in a dataset, often used in visualizations of searching algorithms or graph structures.
A measure of an algorithm’s efficiency, describing how its runtime or space requirements grow as the input size increases.
An individual item or value in a dataset, or a building block in an HTML document or data structure.
A sorting algorithm that builds a sorted array one item at a time by inserting elements into their correct position.
A basic unit of a data structure, such as a linked list or tree, that contains data and links to other nodes.
A function or algorithm that calls itself repeatedly until a base condition is met.
A simple sorting algorithm that repeatedly finds the smallest element from the unsorted portion of a list and swaps it into its correct position. It reduces swaps but still performs many comparisons.