• edited by
2,561 views
0 0 votes


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,30,12,17$
Then the order of these elements after second pass of the algorithm is
(3) $8,9,15,20,47,4,12,17,30,40$
(b) $8,15,20,47,4,9,30,40,12,17$
(c) $15,20,47,4,8,9,12,31,40,17$
(d) $4,8,9,15,20,47,12,17,30,40$
[GATE-1999]

the wornat case height of AVL tree with fingoes
11
(a) Rlad 1
(b) $n \log (n+1)$
ja) $184 \log (n+2)$
(d) 1.44 nlog n

1 Answer

Best answer
0 0 votes
Q.20) 1st pass [20,47], [8,15],[4,9],[30,40],[12,17]

          2nd pass [8,15,20,47],[4,9,30,40],[12,17]   So (B) is the answer

Q.14) http://lcm.csa.iisc.ernet.in/dsa/node112.html
• selected by
Position:
Show:

Related questions

2 2 votes
1 1 answer
667
667 views
Sahil Gupta asked Dec 19, 2014
667 views
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...
0 0 votes
2 2 answers
367
367 views
amar100 asked Feb 15, 2025
367 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...
1 1 vote
1 1 answer
1.2k
1.2k views
dhruba asked Jun 5, 2023
1,172 views
Suppose a BST is converted into an AVL tree. Which of the following statements is correct?a. The in-order traversal of the AVL tree and the BST will be the same.b. The pr...
10 10 votes
1 1 answer
555
555 views