Question: #include #include #include using namespace std; class Student{ char name[45]; int priority; }; class BinaryHeap { private: vector heap; int left(int parent); int right(int parent);
#include
class Student{ char name[45]; int priority; }; class BinaryHeap { private: vector
void BinaryHeap::insert(Student element) { heap.push_back(element); heapifup(heap.size()-1); }
void BinaryHeap::DeleteMin() { if(heap.size()==0) { cout
int BinaryHeap::ExtractMin() { if(heap.size()==0) { return-1; } else return heap.font(); }
void BinaryHeap::print() { vector void BinaryHeap::Peek() { vector int BinaryHeap::left(int parent) { int l=2*parent; if(l int BinaryHeap::right(int parent) { int r = 2* parent+1; if ( r void BinaryHeap::heapifyup(int n) { if (in >= 0 && parent(in) >= 0 && heap[parent(in)] > heap[in]) { int temp = heap[in]; heap[in] = heap[parent(in)]; heap[parent(in)] = temp; heapifyup(parent(in)); } } void BinaryHeap::heapifdown(int n) { int child = left (in); int child = right (in); if (child >= 0 && child >= 0 && heap[child] > heap[childl]) { child = childl; } if (child > 0 && heap [in] > heap [child]) int temp = heap[in]; heap[in] = heap[child]; heap[child] = temp; heapifydown(child); } } int main() { BinaryHeap h; student s; while (1) { cout>choice; switch(choice) { case 1 ; cout>element->name; cout> element->priority; h.Insert(element); break; case 2; h.Delete(); break; case 3; cout I have few errors: please fix errors of the program amd also include output of the program. ![#include #include #include using namespace std; class Student{ char name[45]; int priority;](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f458d8202b6_55966f458d7c330b.jpg)

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
