I'm thinking about writing a program which utilizes huffman encoding, however, I need to set up a binary tree to do this. I was wondering how everyone here would go about doing that...I was thinking that a struct with pointers to the left and right node and a variable for data (for use when it is a leaf) would work, dynamically allocating all the nodes like some twisted version of a linked list, but it seems that I'll also be using a lot of storage (relatively speaking) compared to the amount of data I'm actually storing. Are there any better ways of doing this?