Page 1 of 1

Below are a number of statements. Indicate which of these is correct. The time complexity of traversing a binary search

Posted: Mon May 02, 2022 11:59 am
by answerhappygod
Below are a number of statements. Indicate which of these is
correct.
The time complexity of traversing a binary search tree that
contains 'n' elements is O (n) in the worst case.
The time complexity of traversing a red-black tree that contains
'n' elements is O (log2 n) in the worst case.
Traversing a binary search tree, which contains integers, according
to the "inorder" principle always gives us integers in sorted
ascending order.
If we insert a sequence of integers in an empty BST, it will always
be at least as high as the tree we get if we insert the same
sequence of integers in an empty red-black tree.
If we insert a sequence of integers in an empty BST, it will always
be twice as high as the tree we get if we insert the same sequence
of integers in an empty red-black tree.
Group of answer options
Only statements A, B, C and D are correct.
Only statements A, B and C are correct.
All statements are correct.
Only statements A, C, D and E are correct.
Only statements A, C and D are correct.