(Solved):Draw the binary search tree by inserting the numbers listed below from left to right: 17, 15, 23, 99, 45,32,20,1. View Answer…

 

Question

Draw the binary search tree by inserting the numbers listed below from left to right: 17, 15, 23, 99, 45,32,20,1.

 

EXPERT ANSWER

17, 15, 23, 99, 45,32,20,1.

the first data is taken as a root node:

17

now insert 15

15 is less than 17 so it’s on the left side of the root

now insert 23

23 is greater than 17 so it’s on the right side of the root

now

Scroll to top