When searching for the key value 60 in a binary search tree, nodes containing the key values 10, 20, 40, 50, 70 80, 90 are traversed, not necessarily in the order given. How many different orders are possible in which these key values can occur on the search path from the root to the node containing the value 60?
(A) 35
(B) 64
(C) 128
(D) 5040
Answer: (A)
Explanation: There are two set of values, smaller than 60 and greater than 60. Smaller values 10, 20, 40 and 50 are visited, means they are visited in order. Similarly, 90, 80 and 70 are visited in order.
= 7!/(4!3!)
= 35
Quiz of this Question
Recommended Posts:
- GATE | Gate IT 2007 | Question 80
- GATE | Gate IT 2007 | Question 79
- GATE | Gate IT 2007 | Question 75
- GATE | Gate IT 2007 | Question 24
- GATE | Gate IT 2007 | Question 70
- GATE | Gate IT 2007 | Question 69
- GATE | Gate IT 2007 | Question 25
- GATE | Gate IT 2007 | Question 26
- GATE | Gate IT 2007 | Question 27
- GATE | Gate IT 2007 | Question 28
- GATE | Gate IT 2007 | Question 30
- GATE | Gate IT 2007 | Question 31
- GATE | Gate IT 2007 | Question 32
- GATE | Gate IT 2007 | Question 33
- GATE | Gate IT 2007 | Question 23
- GATE | Gate IT 2007 | Question 22
- GATE | Gate IT 2007 | Question 21
- GATE | Gate IT 2007 | Question 74
- GATE | Gate IT 2007 | Question 73
- GATE | Gate IT 2007 | Question 72

