315 views
0 votes
draw the binary search tree whose elements are inserted in the following order: 50 72 96 94 107 26 12 11 9 2 10 25 51 16 17 95

User JamieRowen
by
8.7k points

1 Answer

6 votes

Here is the binary search tree after inserting the elements in the given order:

The Binary Tree

50

/ \

26 72

/ \ / \

12 28 51 96

/ \ / \

11 16 94 107

/ \ /

9 25 95

/

2

This tree is constructed based on the order of insertion, following the properties of a binary search tree where smaller elements go to the left subtree and larger elements go to the right subtree.

The binary search tree organizes elements by insertion order: smaller left, larger right. Follows insertion sequence: 50, 26, 72, 12, 28, 51, 96, 11, 16, 94, 107, 9, 25, 95, 2.

draw the binary search tree whose elements are inserted in the following order: 50 72 96 94 107 26 12 11 9 2 10 25 51 16 17 95-example-1
User Jeremy Dunn
by
8.1k points