Homework 4

Goals

Write a program that will encode a message using Huffman code.

For this homework you may NOT use STL container classe for LIST.

Implement an ADT for a binary tree and a doubly linked list. You do not need to make fully templated ADT's, but you must implement these ADT's.

Use the ADTs described in the book, but add any functions that you need. (such as merge for two trees to create a third)

Use your tree and list ADT to implement Huffman's algorithm.

When building your code, number left child with a 0 and right child with a 1.

When selecting the minimum character, if frequencies are equal, select the node with the lowest letter.

When combining two trees, the new root should be assigned the lowest "letter" of the two sub trees.

Your program should produce three files

When you have finished this project, please e-mail all of the files to me as a single tar file.