Bucket Sort

Single-digit Bucket Sort:

  • stable: equal items stay in original order
  • Run-time: , auxiliary space
  • Bucket size is for array .?

Warning

Don’t forget: if they say that means we are in base 2, binary.

Questions

  • The auxiliary space of BucketSort are both . Why does this depend on  in addition to ?
    • We initialize an array of buckets () in total storing them is .
  • Run-time of Bucket Sort and LSD-Radix Sort the same?
    • No, in my opinion, LSD is faster? according to an assignment we did.
    • Bucket Sort has run time of
    • LSD Radix Sort has a run-time of
  • Given an array of integers where each entry is in the range , the runtime to sort the array using BucketSort is in
    • ? no idea
    • Correct answer is
    • Since we need buckets to cover all possible values.