Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Structure Activities Richard Anderson University of Washington July 2, 20081IUCEE: Data Structures Activities.

Similar presentations


Presentation on theme: "Data Structure Activities Richard Anderson University of Washington July 2, 20081IUCEE: Data Structures Activities."— Presentation transcript:

1 Data Structure Activities Richard Anderson University of Washington July 2, 20081IUCEE: Data Structures Activities

2 Decode the following E0 T11 N100 I1010 S1011 11010010010101011 E0 T10 N100 I0111 S1010 100100101010 July 2, 20082IUCEE: Data Structures Activities

3 Construct the tree for the following code E0 T11 N100 I1010 S1011 July 2, 20083IUCEE: Data Structures Activities

4 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 5 Delete 10 – replace w. smallest in right subtree 3092 207 10 Student Activity 30182 2510 20 11 17 15 July 2, 2008IUCEE: Data Structures Activities

6 July 2, 2008IUCEE: Data Structures Activities6 AVL Trees What is the most important aspect of AVL trees?

7 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

8 July 2, 2008IUCEE: Data Structures Activities8 Splay E (submit your answer) B I H C D G F E A

9 July 2, 2008IUCEE: Data Structures Activities9 Splay Trees What is the most important aspect of Splay trees?

10 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}

11 11 3 1 2 4 5 6 7 1 775 1 2 3 4 5 6 7 Up Student Activity int Find(x:int) } Give the code for the find operation July 2, 2008IUCEE: Data Structures Activities

12 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 ?

13 Comparing Priority Queues Binary Heaps d-Heaps Leftist Heaps Skew Heaps Binomial Queues: Student Activity July 2, 2008IUCEE: Data Structures Activities

14 14 Resolving Collisions with Double Hashing 0 1 2 3 4 5 6 7 8 9 Insert these values into the hash table in this order. Resolve any collisions with double hashing: 13 28 33 147 43 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 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 16 RadixSort Input:126, 328, 636, 341, 416, 131, 328 0123456789 BucketSort on lsd: 0123456789 BucketSort on next-higher digit: 0123456789 BucketSort on msd: Student Activity July 2, 2008IUCEE: Data Structures Activities


Download ppt "Data Structure Activities Richard Anderson University of Washington July 2, 20081IUCEE: Data Structures Activities."

Similar presentations


Ads by Google