in DS retagged by
690 views
2 votes
2 votes
When searching for the key value 50 in a binary search tree, node containing the key values 10, 30, 40, 70, 90, 120, 150, 175 are traversed, in any order. The number of different orders passing in which these keys values can occur on the search path from the root to node containing the value 50 are ________.
in DS retagged by
by
690 views

1 Answer

2 votes
2 votes
Best answer

This qs has been answered many times.look u have 3 nodes in the left side of 50 and 5 nodes in the right side. U can traverse all the nodes in 8! Way. In which we can traverse left side in 3! Way Right side 5!.

Total no of ways = 8!/(5! *3!) = 56

Basically the problem lies in combinatory.

Ref: https://gateoverflow.in/3462/gate2007-it_29

selected by

3 Comments

Please provide the reference link where this is explained before.
0
0
Provided, though I explained it..
0
0
Thanks for the reference too.
0
0