1. Your new quicksort method should have an if-statement that tests whether (n 2. Change the heap rule so that the value in every node is less than or equal to its children. Modify makeHeap to build...


1. Your new quicksort method should have an if-statement that tests whether (n <=>


2. Change the heap rule so that the value in every node is less than or equal to its children. Modify makeHeap to build this new kind of heap by changing the test in the while-loop to this:


(k>0 && data[k]


In reheapifyDown, change the series of ifstatements so that they find the index of the smaller child. If this smaller child is less than the current node, swap the current node with the smaller child and continue. Otherwise, the heap is okay.


Nov 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here