Algorithm Visualizer
Explore and understand algorithms through interactive, step-by-step visualizations.
Bubble Sort
SortingA simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Selection Sort
SortingAn in-place comparison sorting algorithm that repeatedly selects the minimum element and moves it to the sorted part.
Insertion Sort
SortingA simple sorting algorithm that builds the final sorted array one item at a time, inserting each new item into its proper place.
Merge Sort
SortingAn efficient, stable, comparison-based sorting algorithm using the divide and conquer paradigm.
Quick Sort
SortingAn efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order using a pivot.
Heap Sort
SortingA comparison-based sorting technique based on a Binary Heap data structure. It is similar to selection sort.
Shell Sort
SortingA highly efficient, in-place comparison sort. It is an generalization of insertion sort, allowing the exchange of items that are far apart.
Counting Sort
SortingA non-comparison sorting algorithm that operates by counting the number of objects that have each distinct key value.
Radix Sort
SortingA non-comparative sorting algorithm that sorts integers by processing individual digits.
Bucket Sort
SortingA distribution-based sorting algorithm that divides elements into buckets, sorts each bucket individually, and then concatenates them.
Comb Sort
SortingAn improved version of bubble sort that eliminates small values at the end of the list (turtles) by using a gap larger than 1.
Gnome Sort
SortingA simple sorting algorithm similar to insertion sort that works by moving elements backward until they are in the correct position.
Cocktail Shaker Sort
SortingA bidirectional variation of bubble sort that traverses the list in both directions alternately, improving performance on certain types of data.
Tim Sort
SortingA hybrid stable sorting algorithm derived from merge sort and insertion sort, designed to perform well on real-world data. It is the default sorting algorithm in Python and Java.
Linear Search
SearchingA sequential search algorithm that starts at one end and goes through each element of a list until the desired element is found.
Binary Search
SearchingAn efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item.
Jump Search
SearchingA searching algorithm for sorted arrays. The basic idea is to check fewer elements by jumping ahead by fixed steps.
Exponential Search
SearchingA search algorithm particularly useful for unbounded or infinite arrays. It finds the range where the target element exists by exponentially increasing the index, then performs binary search within that range.
Interpolation Search
SearchingAn improved variant of binary search for uniformly distributed sorted arrays. Instead of always checking the middle element, it estimates the position of the target based on its value.
Fibonacci Search
SearchingA comparison-based search technique that uses Fibonacci numbers to divide the array into unequal parts. It's similar to binary search but divides the array using Fibonacci numbers instead of dividing it in half.
Kadane's Algorithm
ArraysAn efficient algorithm to find the contiguous subarray within a one-dimensional array of numbers that has the largest sum.
Dutch National Flag Problem
ArraysAn algorithm for sorting an array of 0s, 1s, and 2s in a single pass.
Sliding Window Maximum
ArraysA problem which involves finding the maximum element in every subarray of size k.
Breadth-First Search (BFS)
GraphsA graph traversal algorithm that explores neighbors first before moving to the next level of neighbors.
Depth-First Search (DFS)
GraphsA graph traversal algorithm that explores as far as possible along each branch before backtracking.
Dijkstra's Algorithm
GraphsAn algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks.
Bellman-Ford Algorithm
GraphsAn algorithm that computes shortest paths from a single source vertex to all other vertices in a weighted digraph, even with negative edge weights.
Prim's Algorithm
GraphsA greedy algorithm that finds a minimum spanning tree for a weighted undirected graph.
Kruskal's Algorithm
GraphsA greedy algorithm that finds a minimum spanning tree for a weighted undirected graph by adding edges in increasing order of weight.
Fibonacci Sequence (Dynamic Programming)
Dynamic ProgrammingA classic problem solved using dynamic programming by storing results of subproblems.
Longest Increasing Subsequence
Dynamic ProgrammingA dynamic programming problem to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order.