Define heap. Write bottom-up construction algorithm. Construct heap for the list 1,8,6,5,3,7 using bottom-up algorithm and successive key insertion method

Define heap. Write bottom-up construction algorithm. Construct heap for the list 1,8,6,5,3,7 using bottom-up algorithm and successive key insertion method

Answer:-

A Heap is a special Tree-based data structure in which the tree is a complete binary tree.

Algorithm: HeapBottomUp(H[n..1])

Leave a Reply

Your email address will not be published. Required fields are marked *