Algorithms
November 26, 2023Data-Structures
November 26, 2023Binary-search-tree
| Question 4 |
(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.
| Theory Explanation. |
Correct Answer: A
