Question 1
The worst case running time to search for an element in a balanced in a binary search tree with n2^n elements is
(A) [Tex]\\Theta(n log n) [/Tex]
(B) [Tex]\\Theta (n2^n) [/Tex]
(C) [Tex]\\Theta (n) [/Tex]
(D) [Tex]\\Theta (log n) [/Tex]
A
B
C
D
Question 2
What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.
Question 3
60 / \\ 20 100 / \\ 80 120Which of the following is updated AVL tree after insertion of 70
A 70 / \\ 60 100 / / \\ 20 80 120 B 100 / \\ 60 120 / \\ / 20 70 80 C 80 / \\ 60 100 / \\ \\ 20 70 120 D 80 / \\ 60 100 / / \\ 20 70 120
Question 4
Question 5
Which of the following is true
The AVL trees are more balanced compared to Red Black Trees, but they may cause more rotations during insertion and deletion.
Heights of AVL and Red-Black trees are generally same, but AVL Trees may cause more rotations during insertion and deletion.
Red Black trees are more balanced compared to AVL Trees, but may cause more rotations during insertion and deletion.
Heights of AVL and Red-Black trees are generally same, but Red Black trees may cause more rotations during insertion and deletion.
Question 6
Question 7
Question 8
Question 9
Is the following statement valid? A Red-Black Tree which is also a perfect Binary Tree can have all black nodes
Question 10
Which of the following operations are used by Red-Black trees to maintain balance during insertion/deletion? a) Recoloring of nodes b) Rotation (Left and Right)
There are 20 questions to complete.