CS 106B Lecture Notes - Lecture 23: Huffman Coding, Directed Graph, Object Copying

46 views2 pages

Document Summary

Assignment 6: huffman encoding: yeah hours thursday at 8pm, compression algorithm that uses trees, it is beautiful mathematically and has an interesting history. Jpeg and mp3 are both used in everyday life. Const: a keyword that promises that this method will not change the value of any instance variables, also means you can"t call non-const helper methods. Tree final question: how to create the mirror of a tree (the right of each subtree becomes the left and the left becomes the right, first figure out how to make a deep copy of the tree. Recursively call copy on the left and right children of the root, setting those calls equal to new trees of the children. Return null if tree passed in is null (base case: to make a mirror of the tree, just swap new left tree to be right and new right tree to be left. Graphs: can have cycles, don"t have roots, simple graph.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents