Trace
Go to Toph
Graph Theory Breadth-first SearchDepth-first SearchKruskal's Algorithm
Number Theory Sieve of Eratosthenes
Search Binary Search
Sorting Bubble SortIn-place Merge SortInsertion SortMerge SortSelection Sort

Sorting

Bubble Sort

Bubble sort repeatedly steps through a list, swapping adjacent out‑of‑order elements until the entire sequence is sorted.

In-place Merge Sort

In‑place merge sort sorts an array by recursively dividing it and merging the sub‑arrays using only O(1) extra space instead of auxiliary buffers.

Insertion Sort

Insertion sort builds a sorted portion of the list by repeatedly inserting each unsorted element into its correct position among the already‑sorted elements.

Merge Sort

Merge sort recursively divides a list into halves, sorts each half, and then merges the sorted halves to produce a fully ordered sequence.

Selection Sort

Selection sort repeatedly selects the smallest (or largest) unsorted element and swaps it into its final position in the array.

© 2025 Toph | Furqan Software