{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

l10-heaps

# l10-heaps - CS112 Data Structures Lecture 10 Heaps CS112...

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

CS112: Slides for Prof. Steinberg ʼ s lecture 1 Lecture 10 CS112: Data Structures CS112: Data Structures Lecture 10 Heaps

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

View Full Document
CS112: Slides for Prof. Steinberg ʼ s lecture 2 Lecture 10 Review: General Trees Review: General Trees Each node has an arbitrary number of children Problem: representation of a node B C D A H E F G I J
CS112: Slides for Prof. Steinberg ʼ s lecture 3 Lecture 10 General Trees General Trees Each node has an arbitrary number of children Problem: representation Solution: linked list of children B C D A H E F G I J first child next sibling

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

View Full Document
CS112: Slides for Prof. Steinberg ʼ s lecture 4 Lecture 10 General Tree as Binary General Tree as Binary First child <=> Left child Next sib <=> Right child B C D A H E F G I J
CS112: Slides for Prof. Steinberg ʼ s lecture 5 Lecture 10 Data Compression Data Compression In most data some symbols appear more often than others Eg English text ‘e’ appears more often than ‘q’ In ascii code, each character is 8 bits. Suppose we had a code in which common symbols took fewer bits and uncommon symbols took more bits

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

View Full Document
CS112: Slides for Prof. Steinberg ʼ s lecture 6 Lecture 10 Huffman Code Huffman Code EG 3 symbols: a, b, c, with a most frequent Code: 0 = a, 10 = b, 11 = c
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 22

l10-heaps - CS112 Data Structures Lecture 10 Heaps CS112...

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

View Full Document
Ask a homework question - tutors are online