Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

public T remove () Comparable rVal arr[0] arr [0] = arr [next-); reHeapDown (0);

ID: 3707634 • Letter: P

Question

public T remove () Comparable rVal arr[0] arr [0] = arr [next-); reHeapDown (0); return (T)rVal; Complete the code for reHeapDown(int index) that was discussed in class and in the book: Note, reHeapDown( int index) is called with an index of 0 after a node has been removed and the root node's info element has been set to the the right most leaf node's info element. The variable, next, is the index of the last node in the Heap. Your method should be recursive. 16. public void reHeapDown (int index) (

Explanation / Answer

Answer:

Method is recursive

Thanks....