Tree_handson[1]
Tree_handson[1]
1. Create a binary search tree with the following numbers: 20, 25, 10, 5, 15.
Delete keys 20, 10 and 25 one after the other and show the trees at each
stage.
2. Construct a binary search tree from the numbers: 30, 20, 40, 10, 25, 35, 50.
Delete 20, 40 and 30 one after the other and illustrate the tree at each step.
3. Build a binary search tree using the numbers: 8, 3, 10, 1, 6, 14, 4. Delete keys
1,4,10 and 3 sequentially and show the trees after each deletion.
4. Form a binary search tree with the following values: 12, 7, 9, 15, 18, 3, 5.
Delete keys 9 and 3
5. Create a binary search tree with the following numbers: 45, 25, 65, 15, 35, 55,
75. Delete keys 25 and 65 one after the other and show the trees at each
stage.
Construct expression trees and perform pre-order, post-order and inorder traversals
1. Expression: (x−y)∗(z+(a/b))(x - y)
2. Expression: (r - (s * t))(p+q)/(r−(s∗t))
4. Expression: ((u−v)+w)∗(x+y)((u - v) + w)