Question: Please answer 1.3 1. Write a complete C++ code, for the following tasks: 1.1 Create a binary search tree from the given vector. The order

Please answer 1.3

Please answer 1.3 1. Write a complete C++ code, for the following

1. Write a complete C++ code, for the following tasks: 1.1 Create a binary search tree from the given vector. The order of the element inserted to the tree should be in the order as they appear in the vector. You must make use for a for loop for this task. [5 points] Vector vec = {6, 10, 8, 3, 9, 20, 5, 2} 1.2 Perform a tree traversal to display the following output. You must display the exact output as shown below to get full points. [5 points] Tree Traversal 6 1 3 2151 10 |8| 9 20 I 1.3 Display the smallest and largest numbers in the tree. You must display the exact output as shown below to get full points. [5 points] The smallest number is :2 The largest number is : 20 1.4 Is the tree constructed from question 1.1 a complete binary tree? Why or why not? [5 points]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!