Suppose you are searching a BST for some value. The three numbers on the left re
ID: 3835048 • Letter: S
Question
Suppose you are searching a BST for some value. The three
numbers on the left represent the values encountered at each
node as the search progresses. Circle one of the three
choices listed after the sequence of values.
Please explain how you get the answers (in general, not each one).
you are searching a BST for some value. The three 17) Suppose numbers on the left represent the values encountered at each node as the search progresses Circle one of the three choices listed after the values (6 points Sequence Node Valu Choice 1 Choice 2 Choice 3 Possible if possibl e for not possible a) 10 20 30 searchin some values for any search for 25 but not 25 value Possible if possibl e for not possible b) 10 30 20 searchin some values for any search for 25 but not 25 value Possible if possibl e for not possible 20 10 30 searchin some values for any search for 25 but not 25 value Possibl d) 20 30 10 but not 25 Possibl possible 30 10 20 but not 25 Possible if possibl e for not possible 30 20 10 searchin some values for any search for 25 but not 25 valueExplanation / Answer
A) 10 20 30 : Possible if Searching for 25 (Choice 1)
Explanation : 25 we want to search, gets 10, moives right gets 20, agaiun move right gets 30 ..So Choice A
B) 10 30 20 : Possible if Searching for 25 (Choice 1)
Explanation : 25 we want to search, gets 10, moives right gets 30, again move left gets 20 ..So Choice A
C) 20 10 30 : Not Possible for any Search Value (Choice 3)
Explanation : take any value , when we want less than 20 then 30 cant come
D) 20 30 10 :Not Possible for any Search Value (Choice 3)
Explanation : take any value , when we want less than 20 then 30 cant come
E) 30 10 20 : Possible if Searching for 25 (Choice 1)
Explanation : 25 we want to search, gets 30, moives left gets 10, again move right gets 20 ..So Choice A
F) 30 20 10 : Possible for some value but not 25 (Choice 2)
Explanation : 5 we want to search, gets 30, moives left gets 20, again move left gets 10 ..So Choice B
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.