Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: et and place item into it 3. Sort each non-empty bucket with insertion sort non4. Put items from non-empty buckets back into array non3 Bucket Sort: index ! All All items in one bucket must be greater than those in the preceding buckets and less than those those in the following buckets – If x ≤ y, f(x) ≤ f(y) ! Examples Examples for the computation of the bucket index: index: – Uniformly distributed values x with [0.0, 1.0]: Uniformly • For m buckets use “hash function” h(x)=floor(m*x) For buckets – For any bit representation of the keys: • Use a group of the log2m Most-Significant Bits Most- 4 Bucket Bucket Sort: pseud...
View Full Document

This document was uploaded on 03/06/2014 for the course ECE 368 at Purdue University-West Lafayette.

Ask a homework question - tutors are online