Question: ou are given a maxheap ( keeps the largest value at the root ) , which has 4 functions push ( h , v )
ou are given a maxheap keeps the largest value at the root which has functions
pushhv vpoph newh and bisNotEmptyh
where h is a heap, v is the value pushedpopped on the heap, new creates a new empty heap,
isNotEmpty tests the heap, and b is a Boolean. Assume h is passed by reference, so it can be
changed. What will this pseudocode program print? points
newh;
pushh;
pushh;
pushh;
pushh;
pushh;
while isNotEmptyh do
printfd poph;
printf
;
B
A C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
