(a) In a binary tree, a full node is defined to be a node with 2 children. Use…

PYQ GATE 1999

(a) In a binary tree, a full 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 the 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.

Attempted by 2 students.

Sign up free to check your answer

Sign up free

Explore the full course: Data Structures

Loading lesson…