Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design and implement a heap in C++ by vectors that follows the following standar

ID: 3838862 • Letter: D

Question

Design and implement a heap in C++ by vectors that follows the following standard. Let T be a binary tree.
• If v is the root of T, then f(v) = 1
• If v is the left child of node u, then f(v) = 2f(u)
• If v is the right child of node u, then f(v) = 2f(u) + 1
– Each of the nodes in the heap is
• the name of a student (a string) and
• the corresponding priority integer for each student (each name)
– The heap needs to have at least the following functions:
• Constructor() // making an empty heap
• Destructor() // destroying the heap
• Insert() // inserting a student into the heap
• Delete() // deleting the top of the student from the heap
• Peek() // viewing the top of the student
• Print() // printing the ordered list of students
• Size() // returning the size of the heap
– Test your heap by the following procedures.
• Create a heap with 10 students by inserting students one by one
• Print the heap
• Delete the top of the student in the heap
• Peek the top of the student in the heap
• Print the size of the heap
• Insert a student
• Print the heap again
– Create a function called SortHeap() to sort the heap
– Test SortHeap() function by print the sorted result

Also plz include the output with the following C++ program.

Explanation / Answer

This venture is expected Friday May twelfth by midnight. No late entries will be acknowledged. This venture is intended to help you comprehend store better and help set you up for the last, most decisive test.
This lab is on reserve recollections and you should take a shot at timberlake to finish this venture. The goal is to assess diverse reserve associations utilizing the store test system called dinero. You will require a memory follow to finish this task. The memory follow data is given toward the end. You can utilize dinero on timberlake. by means of the charge "dineroIV filename.din".
1. Set dinero as a brought together reserve, and utilize square size 32, associativity 1 and compose back alternatives. Change the reserve measure as 1k, 2k, 4k, 8k, 16k and 32k and plot the quantity of misses for the follow record prog_trace.din. The follow documents can be found in the index given toward the end. 2. Set direction reserve measure 8192 and information store estimate 8192 and differ the piece measure as 8, 16, 32 and 64 utilizing the compose back convention. Produce a plot indicating hit proportion versus square size. 3. Set guideline reserve estimate 8192 and information store measure 8192 and differ the associativity as 1, 2, 4 and full utilizing the compose back convention. Create a plot demonstrating the hit proportion versus the associativity. 4. Same as 3 however utilize compose through. 5. Set guideline reserve measure 8192, information store estimate 8192, piece measure 32 and associativity level 4 and change the substitution arrangement utilizing LRU, FIFO and arbitrary. Produce a plot demonstrating the hit proportion versus the substitution approach. 6. Same as 5 yet utilize full associativity

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote