Preorder traversal and inorder traversal 

we have Preorder traversal and inorder traversal,and we need to Calculate
after traversal