[SOLVED] Priority_queue to simulate a Binary_Tree

15.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)
Use a Priority_queue to simulate a Binary_Tree
Techniques/Structures: Polymorphism, SmartPointers, Priority_Queue, Lambdas
Step1: 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.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.