YSC2229: Introductory Data Structures and Algorithms
1. YSC2229 Lecture Notes, Week 01
2. YSC2229 Lecture Notes, Week 02
3. YSC2229 Lecture Notes, Week 03
4. YSC2229 Lecture Notes, Week 04
5. YSC2229 Lecture Notes, Week 05
6. YSC2229 Lecture Notes, Week 06
7. YSC2229: Midterm Project, Week 07
8. YSC2229 Lecture Notes, Week 08
9. YSC2229 Lecture Notes, Week 09
10. YSC2229 Lecture Notes, Week 10
11. YSC2229 Lecture Notes, Week 11
11.1. Run-Length Encoding
11.2. Huffman Encoding
11.3. Equivalance Classes and Union-Find
11.4. Exercises
12. YSC2229 Lecture Notes, Week 12
13. YSC2229 Lecture Notes, Week 13
14. YSC2229 Lecture Notes, Week 14
YSC2229: Introductory Data Structures and Algorithms
Docs
»
11. YSC2229 Lecture Notes, Week 11
11. YSC2229 Lecture Notes, Week 11
ΒΆ
11.1. Run-Length Encoding
11.1.1. Design Considerations
11.1.2. Implementation
11.2. Huffman Encoding
11.2.1. Assigning Codes via Character Trees
11.2.2. Serializing Huffman Trees
11.2.3. Constructing Huffman tree from Frequencies
11.2.4. Computing Relative Frequencies
11.2.5. Encoding and Writing the Compressed Text
11.2.6. Decompression
11.2.7. Testing and Running Huffman Compression
11.3. Equivalance Classes and Union-Find
11.3.1. Union-Find Structure
11.3.2. Working with Sets via Union-Find
11.3.3. Testing Union-Find
11.4. Exercises
11.4.1. Mandatory exercises
11.4.2. Recommended exercises
11.4.3. Exercise 1
11.4.4. Exercise 2
11.4.5. Exercise 3
11.4.6. Exercise 4
Supplementary materials
Run-Length Encoding
Huffman codes
Union-Find
Automated Tests