lec17

# Lec17 - Outline Radix Sort MSD Radix Sort LSD Radix Sort Tries Lecture 17 Radix Sort and Radix Search p 1 Number and String Representation A bit 0

This preview shows pages 1–5. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Number and String Representation A bit: 0 or 1 A byte: a ﬁxed-length sequence of bits A word: a ﬁxed-length sequence of bytes A string: a variable-length sequence of bytes MSD: most signiﬁcant digit (bit) LSD: least signiﬁcant digit (bit) Lecture 17, Radix Sort and Radix Search p. 2
bitwise operations and, or, xor, etc. shift extract a digit from a number MSD in a string LSD in a string Lecture 17, Radix Sort and Radix Search p. 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
MSD Radix Sort Simple Observation: 202 is greater than 102, because the MSD of 202 is 2, and MSD of 102 is 1. Idea: (compare with Quicksort) Group all number into partitions, called bucket (Also called a pass) (similar to quicksort) No pivots to choose, partition numbers us- ing the MSD. (diﬀerent from quicksort) Recursively sort numbers in each bucket. (similar to quicksort)
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/17/2010 for the course CS 240 taught by Professor Ortiz during the Spring '09 term at Waterloo.

### Page1 / 11

Lec17 - Outline Radix Sort MSD Radix Sort LSD Radix Sort Tries Lecture 17 Radix Sort and Radix Search p 1 Number and String Representation A bit 0

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online