Data Structure Activities - PowerPoint PPT Presentation

About This Presentation
Title:

Data Structure Activities

Description:

Data Structure Activities. Richard Anderson. University of ... Activities ... IUCEE: Data Structures Activities. 5. Delete 10 replace w. ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 17
Provided by: rich484
Category:

less

Transcript and Presenter's Notes

Title: Data Structure Activities


1
Data Structure Activities
  • Richard Anderson
  • University of Washington

2
Decode the following
11010010010101011
100100101010
Ambiguous
Prefix code
3
Construct the tree for the following code
4
Draw a Huffman tree for the following data values
and show internal weights3, 5, 9, 14, 16, 35
5
Delete 10 replace w. smallest in right subtree
10
20
20
7
25
10
15
30
9
2
30
18
2
11
17
Student Activity
6
AVL Trees
  • What is the most important aspect of AVL trees?

7
ZIG-ZAG
Show the ZIG-ZAG transformation to bring X to the
root
Z
Y
A
D
X
B
C
8
Splay E (submit your answer)
E
I
A
H
B
A
G
C
I
D
F
B
H
C
G
D
F
E
9
Splay Trees
  • What is the most important aspect of Splay trees?

10
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
1 2 3 4 5 6 7
-1
1
-1
7
7
5
-1
Up
int Find(xint)
3
Give the code for the find operation
Student Activity
12
Binomial Trees
  • Draw B4
  • What is the height of Bk?
  • What is the weight of Bk?

13
Comparing Priority Queues
Student Activity
  • Leftist Heaps
  • Skew Heaps
  • Binary Heaps
  • d-Heaps
  • Binomial Queues

14
Resolving Collisions with Double Hashing
Student Activity
  • Hash Functions
  • H(K) K mod M
  • H2(K) 1 ((K/M) mod (M-1))
  • M 10

Insert these values into the hash table in this
order. Resolve any collisions with double
hashing 13 28 33 147 43
15
Sort Properties
Student Activity
  • Are the following stable? in-place?
  • Insertion Sort?
  • Selection Sort?
  • MergeSort?
  • QuickSort?
  • Radix Sort

16
RadixSort
Student Activity
  • Input126, 328, 636, 341, 416, 131, 328

BucketSort on lsd
BucketSort on next-higher digit
BucketSort on msd
Write a Comment
User Comments (0)
About PowerShow.com