5/5 – (1 vote)
Use a Priority_queue to simulate a Binary_TreeTechniques/Structures: Polymorphism, SmartPointers, Priority_Queue, LambdasStep1: Create a frequency table of ascii characters based on the frequency of characters in a text file. After processing the file, generate a character frequency table for all characters with a frequency greater than zero.Step2: Using an STL Priority_Queue, create a frequency table with the highest frequency characters at the front.
Step3: Using the PriorityQueue-Tree algorithm as illustrated in class, encode the Speech.txt file in the Lab/data folder. This step will produce an encrypted binary file.Step4: Decrypt your encrypted binary file by using the PriorityQueueTree and demonstrate it decrypts the characters back to the original text.
Reviews
There are no reviews yet.