recategorized by
1,849 views
3 votes
3 votes

A binary search tree is used to locate the number $43.$ Which one of the following
probe sequence is not possible?

  1. $61,52,14,17,40,43$
  2. $10,65,31,48,37,43$
  3. $81,61,52,14,41,43$
  4. $17,77,27,66,18,43$
recategorized by

2 Answers

2 votes
2 votes

ANS:D

To locate the number 43, draw BINARY SEARCH TREE of the given option by keeping in mind there MUST NOT ANY VIOLATION OF DEFINITION.


OPTION:
a,b,c: Correct Probe Sequence(because No Violation)
d:In BST, you will get right subtree of  node 27 contains 66,18,43 (here node 18 must be to the left of parent node 27)
  ​​​​​​​
Reference:https://en.wikipedia.org/wiki/Binary_search_tree

Answer:

Related questions

3 votes
3 votes
2 answers
1
gatecse asked Dec 17, 2017
1,248 views
The $in$-$order$ and $pre$-$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$-$order$ traversal of a binary ...
3 votes
3 votes
2 answers
2
gatecse asked Dec 17, 2017
3,739 views
Which one of the following property is correct for a red-black tree?Every simple path from anode to a descendant leaf contains the same number of black nodes.If a node is...
2 votes
2 votes
2 answers
3
gatecse asked Dec 17, 2017
1,263 views
A strictly binary tree with $10$ leavescannot have more than $19$ nodeshas exactly $19$ nodeshas exactly $17$ nodeshas exactly $20$ nodes
1 votes
1 votes
1 answer
4
gatecse asked Dec 17, 2017
881 views
The minimum number of stacks needed to implement a queue is$3$$1$$2$$4$