2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -17,6 +17,12 @@ A Huffman encoding can be computed by first creating a tree of nodes:
|
|||
## Add the new node to the queue.
|
||||
# The remaining node is the root node and the tree is complete.
|
||||
|
||||
<br>
|
||||
Traverse the constructed binary tree from root to leaves assigning and accumulating a '0' for one branch and a '1' for the other at each node. The accumulated zeros and ones at each leaf constitute a Huffman encoding for those symbols and weights:
|
||||
|
||||
'''Using the characters and their frequency from the string ''"this is an example for huffman encoding"'', create a program to generate a Huffman encoding for each character as a table.'''
|
||||
|
||||
;Task:
|
||||
Using the characters and their frequency from the string:
|
||||
::::: ''' '' this is an example for huffman encoding '' '''
|
||||
create a program to generate a Huffman encoding for each character as a table.
|
||||
<br><br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue