Wrap Up…
Can you implement the add and remove with the knowledge of theseformulas in C++
Add (in-class quiz)
(put the new entry in the last locationPush the new node upward,swapping with its parent until the new node reaches an acceptablelocation)
Remove (in-class quiz)
(move the last node to the root
Push the out-of-place node downward, swapping with its largerchild until the new node reaches an acceptable )
template <class Item> class heap public heap () fused 0: void push(const ltem& entry);
OR
OR