binary trees sp lf figure huffman tree you'll see you can do the same with the other characters if you have the patienceyou can decode the entire bit string this way creating the huffman tree we've seen how to use the huffman tree for decodingbut how do we create this treethere are many ways to handle this problem we'll base our approach on the node and tree classes in the tree java program in listing (although routines that are specific to search treeslike find()insert()and delete(are no longer relevanthere is the algorithm for constructing the tree make node object (as seen in tree javafor each character used in the message for our susie example that would be nine nodes each node has two data itemsthe character and that character' frequency in the message table provides this information for the susie message make tree object for each of these nodes the node becomes the root of the tree insert these trees in priority queue (as described in they are ordered by frequencywith the smallest frequency having the highest priority that iswhen you remove treeit' always the one with the least-used character