3,110 views
1 votes
1 votes
Consider following statements:

S1: Rotation operation in AVL always preserves the Inorder ordering.

S2: The median of all elements in AVL tree is always at root or one of its two children.

S3: If every node in BST has either 0 or 2 children,then searching is O(logn)

S4: In a 3 array tree. If number of internal node is 20 then number of Leaves are 41.

True Statements ?

Ans: Only S1 and S4

1 Answer

0 votes
0 votes

• Rotation operation in always preserves the inorder numbering so 1st is true.
• AVL tree doesnot guarantee that both left and right subtree has equal number of nodes, so statement is false.
• Consider

Related questions

1 votes
1 votes
1 answer
1
kd..... asked Apr 13, 2019
793 views
here what to do first as FIZZA and IMRAN both are unbalanced than either to do RR rotation from FIZZA-IMRAN-NAVEEN or RL rotation from IMRAN-NAVEEN-LOVELY
3 votes
3 votes
1 answer
2
hrcule asked Jul 16, 2018
2,770 views
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required ...
2 votes
2 votes
3 answers
3
2 votes
2 votes
3 answers
4
learncp asked Jan 26, 2016
787 views
Insert the given values in the order in initially empty $\text{AVL}$ tree.$\text{34,21,10,27,24,43,15,6}$What is the value at the root of the tree$?$