in Programming in C recategorized by
9,559 views
1 vote
1 vote

Suppose that we have numbers between $1$ and $1000$ in a binary search tree and we want to search for the number $365$. Which of the following sequences could not be the sequence of nodes examined ?

  1. $4, 254, 403, 400, 332, 346, 399, 365$
  2. $926, 222, 913, 246, 900, 260, 364, 365$
  3. $927, 204,913, 242, 914, 247, 365$
  4. $4, 401, 389, 221, 268, 384, 383, 280, 365$ 
in Programming in C recategorized by
9.6k views

3 Comments

C is the answer???
0
0

In the option C---after insertion of node 914 BST is

but 914 is >913 but is is left of root node(913),it is violating BST property.

0
0
option c is the right answer.
0
0

3 Answers

3 votes
3 votes
Best answer

clearly we can see  option (c) is wrong

selected by
3 votes
3 votes

option C

1 vote
1 vote
ans is c as in option c, 914 can not be travelled after 913
Answer:

Related questions