284 views
0 votes
0 votes

Explain It

1 Answer

0 votes
0 votes
The inorder traversal of the nodes are

10,30,40,50,70,90,120,150,175

But in order to get 50 after traversing all the nodes 10,20,30 should be in this order and

70,90,120,150,175 should be in the this order only .

Therefore  8! / (3! * 5!) = 56    (10,20,30 remains in this order always so divide by 3!  and 70,90,120,150,175 remains in this order always so divide by 5! ).

Ans 56.

Related questions

1 votes
1 votes
1 answer
1
s_dr_13 asked Mar 10, 2019
2,735 views
Consider the following binary tree with root at level 0. What is the internal path length for the above tree?31142932
0 votes
0 votes
1 answer
2
aditi19 asked Oct 1, 2018
627 views
what are the applications of optimal binary search tree?
0 votes
0 votes
1 answer
3
K ANKITH KUMAR asked Aug 29, 2018
1,830 views
Let T (n) be the number of comparisons needed in a binary search of a list of n elements. What is the recurrence relation? Explain. 1) T(n) = T(n/2) + 22) T(n) = T(n/2) +...
1 votes
1 votes
0 answers
4
Anjan asked Jan 9, 2018
339 views
Find number of BST's possible with 6 nodes numbered 1,2,3,4,5 and 6 having 6 as root and height of 4 ?please explain in detail ...