Posted on 2007-11-17
How do i construct BST based on the following:
12, 11, 8, 16, 5, 7, 13, 9, 2
I have been thinking about this for quite some time. Inorder traversal is not suitable as it returns a list of ascending numbers. I have also tried preorder and postorder traversal....but it doesn't seem to work. Pls help.
I just need a diagram to illustrate the BST.