Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Bucket Sort

Sorting Algorithm

A sort that distributes elements into a number of buckets covering ranges of the input, sorts each bucket individually, often with another sort, and then concatenates the buckets; fast on average when the input is spread roughly evenly across the range.

Facts
Time Complexity
O(n) average time under uniform distribution; worst case O(n squared) with insertion sort when all elements fall in one bucket 1
Connections

In Field

Sources
1. Wikipedia: Bucket sort
Worst-case analysis
Quote, Worst-case analysis
The worst-case scenario occurs when all the elements are placed in a single bucket.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.