Creating a Binary Tree

Hello there,
If I add the following numbers in a binary tree in the same sequence
30 , 40 ,35 , 25 , 50 , 45
what should be the inorder , postorder and preorder traversal ?

My program gives :
InOrder 25 , 30 , 35 , 40 , 45 , 50

PostOrder 25 , 35 , 45 , 50 , 40 , 30

PreOrder 30 , 25 , 40 , 35 , 50 , 45

Please match it with your program/algorithm and check my answers.
Topic archived. No new replies allowed.