Question: Please write a header file code with the above instructions in C++, and then write the code for the function Initialize(n). ELEMENT is a data

Please write a header file code with the above instructions in C++, and then write the code for the function Initialize(n).
ELEMENT is a data type that contains a field named key, which is of type int. Note that ELEMENT should not be of type int. HEAP is a data type that contains three fields named capacity (of type int), size (of type int), and H (an array of type ELEMENT with index ranging from 0 to capacity). The functions that you are required to implement are Initialize(n) which returns an object of type HEAP with capacity n and size 0. This function requires you to perform dynamic memory allocation, given the demand
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
