To arrange a binary search tree in ascending order, we need
| To arrange a binary search tree in ascending order, we need
A. Post order traversal only
B. In order traversal only
C. Pre order traversal only
D. Post order traversal and Pre order traversal only
Please scroll down to see the correct answer and solution guide.
Right Answer is: B
SOLUTION
Random binary search tree
Post-order traversal is 23, 18, 27, 25, 10, 60, 80, 70, 30.
In-order traversal traversal is 10, 18, 23, 25, 27, 30, 60, 70, 80
Preorder traversal is 30, 10, 25, 18, 23, 27, 70, 60 ,80
Therefore, to arrange a binary search tree in ascending order, we need In order traversal only