in Algorithms retagged by
220 views
1 vote
1 vote
In a randomised BST is constructing  with 7 distinct elements . What is the probability that its Inorder and postOrder traversal are same
in Algorithms retagged by
220 views

1 Answer

0 votes
0 votes
I think the answer is 1/(7!)

If any node (N) has a right child (R), then in-order will visit (N) before (R) and post-order will visit (R) before (N). Hence the only way the traversals are the same is if all the nodes have only left children.
by

Related questions