AlgoThrive
← All sorting algorithms

Bucket Sort

DefaultComparingSwappingPivotSorted
Main Array Workflow
8
3
11
6
1
9
4
7

pseudocode

buckets = array of empty buckets
for x in a: insert x into bucket[floor(x / interval)]
sort individual buckets
concatenate buckets into original array

Frame 1 / 19

Start

unsorted array

4

3–16 integers between 1 and 20.