1. Write an algorithm that checks if an essentially complete binary tree is a heap. Analyze your…

1. Write an algorithm that checks if an essentially complete binary tree is a heap. Analyze your algorithm and show the results using order notation.

2. Show that there are 2 j nodes with depth j for j < d="" in="" a="" heap="" having="" n="" (a="" power="" of="" 2)="" nodes.="" here="" d="" is="" the="" depth="" of="" the="">

3. Show that a heap with n nodes has n/2 leaves.

 

 

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer