Priority Queues and Huffman Encoding
Introduction to Homework 8
Hunter Schafer
Paul G. Allen School of Computer Science - CSE 143
Priority Queues and Huffman Encoding Introduction to Homework 8 - - PowerPoint PPT Presentation
Priority Queues and Huffman Encoding Introduction to Homework 8 Hunter Schafer Paul G. Allen School of Computer Science - CSE 143 Priority Queue Priority Queue A collection of ordered elements that provides fast access to the minimum (or
Paul G. Allen School of Computer Science - CSE 143
1
1
2
3
3
4
4
4
4
4
4
4
5
5
5
5
5
6
7
8
9
9
pq ← −
‘ ’ freq: 1 ‘c’ freq: 1 ‘d’ freq: 1 ‘a’ freq: 2 ‘b’ freq: 2
← −
9
pq ← −
‘ ’ freq: 1 ‘c’ freq: 1 ‘d’ freq: 1 ‘a’ freq: 2 ‘b’ freq: 2
← −
9
pq ← −
‘ ’ freq: 1 ‘c’ freq: 1 ‘d’ freq: 1 ‘a’ freq: 2 ‘b’ freq: 2
← −
9
pq ← −
‘ ’ freq: 1 ‘c’ freq: 1 ‘d’ freq: 1 ‘a’ freq: 2 ‘b’ freq: 2
← −
9
10
11
12
12
12
12
12
12
12
12
12
12
13
14
14
14
14
14
14
14
15
15
15
15
16
17
17
17
17
17
18
18
19
20