A bucket-sort does not use comparison. Let be a sequence of entries with keys in the range .

Bucket-sort uses the keys as indices into an auxiliary array of sequences.

  • Phase 1: empty sequence by moving each entry into its bucket
  • Phase 2: for , move the entries of bucket to the end of sequence

Between the two phases, bucket sort takes time:

  • Phase 1 takes time
  • Phase 2 takes time