Hi friends, I’m trying to make a hufmann code like this:

http://rosettacode.org/wiki/Huffman_codes

what I do is:

http://nbviewer.ipython.org/gist/elsuizo/b91af4600e34a0463e71

but not how to do the last part:

*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*

to build the binary tree I have been guided by this:

http://rosettacode.org/wiki/Tree_traversal#Julia

Any sugestion is welcome
Regards
​

Reply via email to