Question: The following is a max-heap. After extracting the node with maximum key, what will the array look like? Before extracting: 256 128 100 64 120
The following is a max-heap. After extracting the node with maximum key, what will the array look like? Before extracting: 256 128 100 64 120 90 public int extractMax(intll A) int max = A[0]; A[0] = A[heapsize-1; heapSize heapSize -1; heapify(A, 0); return max; After extracting
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
