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.
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?