Q5. Build two binary search trees in the following orders
of:
a) 23 95 28 77 30 60 33 35 40 58 38 50 55 53 59 54
b) 50 60 33 35 59 40 38 58 23 77 28 95 30 55 53 54
c) Compare the shapes of the binary search trees in a) and b), both
trees share an identical set of
values.
d) Search the key 56 in the BSTree from part a) Comment on the
complexity of the search.
e) Search the key 56 in the BSTree from part b) Comment on the
complexity of the search in
comparison to your answer in part d).
f) Draw the resulting trees from part a) and b) separately after
deleting the value at the root of
the two trees.
do in c++
Q5. Build two binary search trees in the following orders of: a) 23 95 28 77 30 60 33 35 40 58 38 50 55 53 59 54 b) 50 6
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am