a. Prove that for binary heaps, buildHeap does at most 2N2 comparisons
Chapter 6, Problem 6.7(choose chapter or problem)
a. Prove that for binary heaps, buildHeap does at most 2N2 comparisons betweenelements.b. Show that a heap of eight elements can be constructed in eight comparisonsbetween heap elements. c. Give an algorithm to build a binary heap in 138 N + O(logN) element comparisons.
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer