Sorting Atlas13 Algorithms

All Sorting Algorithms

Unified reference for common sorting techniques with complexity, stability, memory profile, and practical usage notes.

Comparison-Based

Generally rely on pairwise element comparison.

Bubble Sort

Comparison-Based

Best

O(n)

Average

O(n²)

Worst

O(n²)

Space

O(1)

Stable: YesIn-place: Yes

Simple and educational; practical only for tiny inputs.

Open In Sort Studio

Selection Sort

Comparison-Based

Best

O(n²)

Average

O(n²)

Worst

O(n²)

Space

O(1)

Stable: NoIn-place: Yes

Minimizes swaps, useful when writes are expensive.

Open In Sort Studio

Insertion Sort

Comparison-Based

Best

O(n)

Average

O(n²)

Worst

O(n²)

Space

O(1)

Stable: YesIn-place: Yes

Very fast for nearly sorted or small datasets.

Open In Sort Studio

Merge Sort

Comparison-Based

Best

O(n log n)

Average

O(n log n)

Worst

O(n log n)

Space

O(n)

Stable: YesIn-place: No

Predictable performance and stable ordering.

Open In Sort Studio

Quick Sort

Comparison-Based

Best

O(n log n)

Average

O(n log n)

Worst

O(n²)

Space

O(log n)

Stable: NoIn-place: Yes

Great in practice with randomized/median pivots.

Open In Sort Studio

Heap Sort

Comparison-Based

Best

O(n log n)

Average

O(n log n)

Worst

O(n log n)

Space

O(1)

Stable: NoIn-place: Yes

Consistent upper bound and low memory footprint.

Open In Sort Studio

Shell Sort

Comparison-Based

Best

O(n log n)

Average

Depends on gaps

Worst

O(n²)

Space

O(1)

Stable: NoIn-place: Yes

Practical mid-ground between insertion and advanced sorts.

Sort Studio support coming soon

TimSort

Comparison-Based

Best

O(n)

Average

O(n log n)

Worst

O(n log n)

Space

O(n)

Stable: YesIn-place: Mostly

Hybrid used in Python/Java for real-world data patterns.

Sort Studio support coming soon

IntroSort

Comparison-Based

Best

O(n log n)

Average

O(n log n)

Worst

O(n log n)

Space

O(log n)

Stable: NoIn-place: Yes

Starts as quicksort, falls back to heapsort to avoid worst case.

Sort Studio support coming soon

Non-Comparison

Use key/index properties instead of direct comparisons.

Counting Sort

Non-Comparison

Best

O(n + k)

Average

O(n + k)

Worst

O(n + k)

Space

O(k)

Stable: YesIn-place: No

Excellent for bounded integer keys.

Sort Studio support coming soon

Radix Sort

Non-Comparison

Best

O(d(n + k))

Average

O(d(n + k))

Worst

O(d(n + k))

Space

O(n + k)

Stable: VariantIn-place: No

Sorts by digits/characters using stable sub-sort.

Sort Studio support coming soon

Bucket Sort

Non-Comparison

Best

O(n + k)

Average

O(n + k)

Worst

O(n²)

Space

O(n + k)

Stable: VariantIn-place: No

Works well with uniformly distributed values.

Sort Studio support coming soon

Pigeonhole Sort

Non-Comparison

Best

O(n + r)

Average

O(n + r)

Worst

O(n + r)

Space

O(r)

Stable: NoIn-place: No

Useful when range `r` is small relative to input size.

Sort Studio support coming soon