Back to All Algorithms
Bucket Sort
Category: Sorting | Time: O(n + k) | Space: O(n)
Visualization
Visual representation of the data structure
Enter an algorithm and input to start visualization.
About Bucket Sort

A distribution sort that works by distributing the elements of an array into a number of buckets. Each bucket is then sorted individually, either using a different sorting algorithm, or by recursively applying the bucket sort algorithm. It is a distribution sort, a generalization of pigeonhole sort that allows for a larger range of keys.

Code Editor
The code is for reference. Editing it won't affect the visualization.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Frequently Asked Questions
About Bucket Sort