Problem
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.