Question: Project 2: You are to implement the Huffman coding algorithm step 2 -- Construct Huffman ordered linked list using insertion sort. ******************************** I. Language: C++
Project 2: You are to implement the Huffman coding algorithm step 2 -- Construct Huffman ordered linked list using insertion sort. ******************************** I. Language: C++ and Java ******************************** ******************************** II. Input : A text file contains a list of
2 ****************************************** IV. Main(argv) ****************************************** Step 1: listHead get a newNode as the dummy listNode with (dummy ,0), listHead to point to. Step 2: inFile open input file using argv outFIle open ouput file using argv Step 3: chr get from inFile Prob get from inFile newNode get a new listNode newNode.chStr chr newNode.prob Prob newNode.next null Step 4: insertNewNode (listHead, newNode) // use algorithm steps given in class Step 5: printList (listHead) // Out put the list to outFile, use the format given in the above. Step 6: repeat step 3 step 5 until the end of inFile . Step 7: close inFile close outFile
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
