Skip to content
Related Articles

Related Articles

GATE | GATE CS 1999 | Question 60

View Discussion
Improve Article
Save Article
  • Last Updated : 09 Oct, 2017
View Discussion
Improve Article
Save Article

[5 Marks question]
a. In a binary tree, a nil node is defined to be a node with 2 children. Use induction on the height of the binary tree to prove that the number of full nodes plus one is equal to the number of leaves.

b. Draw a min-heap that results from insertion of the following elements in order into an initially empty min-heap: 7, 6, 5, 4, 2, 3, 1. Show the result after the deletion of the root of this heap.


Answer:

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!