Course Solutions Uncategorized (Solved) : 1 Suppose Create Empty Tree Items Inserted Follows Treenode Tree Null Insert 5 Tree Insert Q32645990 . . . .

(Solved) : 1 Suppose Create Empty Tree Items Inserted Follows Treenode Tree Null Insert 5 Tree Insert Q32645990 . . . .

 

1)Suppose you create an empty tree and items are inserted asfollows:
TreeNode * tree = NULL;
insert(5, &tree);
insert(8, &tree);
insert(2, &tree);
insert(1, &tree);
insert(10, &tree);
insert(7, &tree);
insert(9, &tree);
insert(12, &tree);
a. What does the BST look like?
b. What nodes are examined when finding 7?
c. What nodes are examined when finding 3?

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post