• edited by
665 views
2 2 votes


In 28 my answer is c but answer given is d.

Q. 28 The number 1,2 , $\qquad$ $n$ are inserted in binary tacarch tree in some order in the resulting tee the right subtree of the root contains p nodes The first number to be inserted in the tree must be

  1. 19
  2. $p+1$
  3. $0=p$
  4. $n=0+1$

1 Answer

3 3 votes
The first inserted element must become the root and as per question we have $p$ elements on right subtree which means $p$ elements are larger than the root. So, out of $n$ elements, the root must be $n - p$.
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
2.6k
2.6k views
Sahil Gupta asked Dec 19, 2014
2,560 views
Please show steps for the question 20 and 14.Q. 20 Itone uses straight two way merge sort algorithm to cort the following elements in ascending order $20,47,15,8,9,4,40,3...
0 0 votes
2 2 answers
366
366 views
amar100 asked Feb 15, 2025
366 views
Common Data For Q. 10 \& Q. 11We have a 4-stage pipeline where$S_{1}=$ Fetch$S_{2}=$ Decode and calculate effective address$S_{3}=$ Fetch operand$S_{4}=$ Execute instruct...
0 0 votes
1 1 answer
621
621 views
Shraddha dwevedi asked Nov 24, 2021
621 views
Q.which of the following data structure cannot be used for efficient implementation of Priority Queue?a. Binary heapb. Height balanced binary tree.c. Sorted array