Given a constructed a tree and all the variables needed for it to work, I simply need to understand HOW one goes about getting an encoded tree from a Huffman Tree.
More specifically, I need to return the String Encoding of a Huffman Tree. No parameters are passed to the function. It is simply a getHuffmanTreeEncoded() function that returns the encoded string of the Tree and I am not sure how I would go to that.
I don't provide code for this question because the rest of it is already done and it is very long / for school... I think I would better understand with words.
Do I need to traverse the tree? Do I need to recursively loop? I need to pass a string variable with the Huffman Tree string encoded. How would I go about that, assuming functions and structure for everything already exists (the tree, getting encoded tests, priority queue implementation ,etc.). What general steps does one take to get the string of a Huffman tree?
-Thanks