I'm having problems trying to understand what functions I need to develop in order to encode this alorithm. I was thinking of doing the math first and them building the tree, but I'm having a hard time grasping this concept. I'm hoping there might be an easier way. I've already developed the readin portion and a sort for the frequencies. but not sure how to develop the tree. Any ideas?