Henry R
- 25
- 0
Draw a Binary Search Trees (BST) produced when data containing 30,40,50,60,10,20,55,15 is inserted one by one.
Thanks.
Thanks.
The discussion revolves around constructing a Binary Search Tree (BST) using a specific set of data points: 30, 40, 50, 60, 10, 20, 55, and 15. Participants are exploring the insertion process and the resulting structure of the tree.
There is no consensus on the correct structure of the BST, as participants express differing views on the placement of certain nodes, particularly 55 in relation to 40.
Participants have not fully resolved the implications of the BST properties on the placement of nodes, and there are unresolved questions regarding the insertion order and resulting tree structure.
Henry R said:Draw a Binary Search Trees (BST) produced when data containing 30,40,50,60,10,20,55,15 is inserted one by one.
Thanks.
evinda said:Note that every node on the right subtree has to be larger than the current node and every node on the left subtree has to be smaller than the current node.
Henry R said:This is ...View attachment 3676
evinda said:Since the data is inserted one by one, $30$ has to be the root.
$40$ is greater than $30$, so it has to be at the right subtree.
So, at the beginning it should be like that:
https://www.physicsforums.com/attachments/3677Can you continue? (Thinking)
Bacterius said:How is 55 smaller than 40?