Question: Part 1 : You will implement heaps two ways, using an array - based implementation, and a dynamic, binary tree representation. Both heaps will store

Part 1: You will implement heaps two ways, using an array-based implementation, and a dynamic, binary tree representation. Both heaps will store the same exact data that will be used for a priority queue of students.
Each node will have two important pieces of data, the students name (a string), and a priority integer. You will need to add pointers, etc., as needed. You may assume you will not have more than 100 students.
You will need to implement the following functions for your heap:
1. Constructor (only if using C++ or Java class implementation)
2. Insert (into heap)
3. Delete (from heap)
4. Peek (view top item)
5. Print (prints the ordered list of students)
6. Destructor (only if using C++ class implementation)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!