Professional Documents
Culture Documents
Assignment (211.5)
Assignment (211.5)
Preorder: ABDGICEHJKF
In order: BIGDAEJHKCF
Post order: IGDBJKHEFCA
O(n) O(n)
O(log n) O(n)
O(log n) O(n)
O(log n) O(n)
PAGE 1
Answer of question 04
30
/ \
23 40
/ \ \
11 26 58
\ /
13 48
Answer of question 05
After deleting the elements(65,16,12,42) .The new Tree looks like:
53 53
/ \ / \
8 60 22 60
/ \ / / /
2 22 57 19 57
/ /
19 8
/
2
Figure-1 figure-2
PAGE 2
Answer of question 06:
a) maximum height of a binary search tree that contains n items
is :- h = n-1 (when each node only has a left child or only has a right child, resulting in a linear structure.)
PAGE 3