Data Structure Activities Richard Anderson University of Washington July 2, 20081IUCEE: Data Structures Activities
Decode the following E0 T11 N100 I1010 S E0 T10 N100 I0111 S July 2, 20082IUCEE: Data Structures Activities
Construct the tree for the following code E0 T11 N100 I1010 S1011 July 2, 20083IUCEE: Data Structures Activities
Draw a Huffman tree for the following data values and show internal weights: 3, 5, 9, 14, 16, 35 July 2, 20084IUCEE: Data Structures Activities
5 Delete 10 – replace w. smallest in right subtree Student Activity July 2, 2008IUCEE: Data Structures Activities
July 2, 2008IUCEE: Data Structures Activities6 AVL Trees What is the most important aspect of AVL trees?
July 2, 2008IUCEE: Data Structures Activities7 ZIG-ZAG X Y Z Show the ZIG-ZAG transformation to bring X to the root A B C D
July 2, 2008IUCEE: Data Structures Activities8 Splay E (submit your answer) B I H C D G F E A
July 2, 2008IUCEE: Data Structures Activities9 Splay Trees What is the most important aspect of Splay trees?
July 2, 2008IUCEE: Data Structures Activities10 Draw an in-tree representation of the following equivalence relation {1,11}, {2, 4, 6, 8, 10, 12}, {3, 5, 7, 9}, {13}, {14}, {15}
Up Student Activity int Find(x:int) } Give the code for the find operation July 2, 2008IUCEE: Data Structures Activities
July 2, 2008IUCEE: Data Structures Activities12 Binomial Trees Draw B 4 What is the height of B k ? What is the weight of B k ?
Comparing Priority Queues Binary Heaps d-Heaps Leftist Heaps Skew Heaps Binomial Queues: Student Activity July 2, 2008IUCEE: Data Structures Activities
14 Resolving Collisions with Double Hashing Insert these values into the hash table in this order. Resolve any collisions with double hashing: Hash Functions: H(K) = K mod M H 2 (K) = 1 + ((K/M) mod (M-1)) M = 10 Student Activity July 2, 2008IUCEE: Data Structures Activities
15 Sort Properties Are the following:stable? in-place? Insertion Sort? Selection Sort? MergeSort? QuickSort? Radix Sort Student Activity July 2, 2008IUCEE: Data Structures Activities
16 RadixSort Input:126, 328, 636, 341, 416, 131, BucketSort on lsd: BucketSort on next-higher digit: BucketSort on msd: Student Activity July 2, 2008IUCEE: Data Structures Activities