edited by
1,257 views
0 votes
0 votes

 

Consider an AVL tree constructed by inserting the elements 18, 10,5,3,27,7,35,43,32 one by one . Which of following options gives the number of comparisions to search the key value 45 in this AVL tree?

  1. 3
  2. 5
  3. 4

in this question ans 5 is correct or 4 ?

i think ans  5 is correct 4 for non match element one for not present so ans will be 5

edited by

1 Answer

Best answer
0 votes
0 votes

see this

final $AVL$ tree look like this

 

edited by

Related questions

0 votes
0 votes
1 answer
1
pream sagar asked Dec 13, 2018
458 views
Which of the following is the time complexity to find the determinant of an upper- triangular matrix of order n*n? O(n^2.5) O(n) O(n^2) O(1)
0 votes
0 votes
2 answers
2
aditi19 asked Dec 18, 2018
1,034 views
Suppose x and y are floating-point variables that have been assigned the values x=8.8 and y=3.5. what will be the value of the following expression?2*x/3*y
0 votes
0 votes
2 answers
3
shaz asked Dec 13, 2018
704 views
How are 2 memory access required here? Only R3 contains a memory address which will be accessed for the operand.
1 votes
1 votes
1 answer
4
pream sagar asked Dec 13, 2018
373 views
For what values of k, the points (k,2-2k),(-k+1,2k) and (-4-k,6-2k) are collinear? ½ ,-½ -1 ,½ 0, 1 -1 , 1