Huffman Coding Tree

Nov 6, 2013 at 1:11am
Hello,
I am having difficulty implementing a huffman tree using c++
My actual assignment is to take in a filename as an argument then it's supposed to find the frequency of each letter and construct a huffman tree and generate a table of codes to encode. Then its supposed to also be able to decode the encoded file.

I'm extremely confused at this time thank you for any help you can offer.
Nov 6, 2013 at 1:30am
I'm guessing you already know how to find the frequency of each letter in a string.

How well do you understand huffman trees? If you don't really understand them, then see if this helps at all:
http://people.cs.pitt.edu/~kirk/cs1501/animations/Huffman.html

If merely implementing them is your challenge, then maybe this will help:
http://www.siggraph.org/education/materials/HyperGraph/video/mpeg/mpegfaq/huffman_tutorial.html

-Albatross
Nov 11, 2013 at 6:14am
The implementation is what i'm having trouble with. I pretty much understand what I'm supposed to do but I just dont understand how to actually build the tree in code.
Nov 11, 2013 at 7:46am
And you expect someone will do it for you?

I fear here are too much tutorials and examples on building any kinds of trees over internet.

http://en.wikibooks.org/wiki/Data_Structures/Trees
Nov 12, 2013 at 12:09am
Did I say I expected someone to do my entire program for me? No I just need help with the code perhaps a simple basic example would be helpful not bullshit comments like that. Thanks for the link though.
Topic archived. No new replies allowed.