Question: Question 1 ( a ) If a Binary Tree is either empty or is a node with a left child and a right child that
Question
a If a Binary Tree is either empty or is a node with a left child and a right child that are both Binary Trees, what additional conditions must a Binary Tree satisfy for it to be
i Complete, and
ii a Binary Heap Tree?
marks
b The items need to be inserted one at a time into a Binary Heap Tree, starting from an empty tree. Show the state of the tree after each item has been inserted.
marks
c One approach for sorting an array of items, is to first insert them into a Binary Search Tree, and then output them back into the array in order. Write, in pseudocode, a recursive procedure for filling the array from the Binary Search Tree, and specify what the initial call of the procedure is You may call any of the standard primitive operators for binary trees
marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
