Question 41
What is the maximum number of nodes in a Binary Tree of height H (where root is at height 0)?
$A binary tree of height H has max nodes = 2^0 + 2^1 + ... + 2^H = 2^{H+1} - 1.$
What is the maximum number of nodes in a Binary Tree of height H (where root is at height 0)?
$A binary tree of height H has max nodes = 2^0 + 2^1 + ... + 2^H = 2^{H+1} - 1.$
Which of the following statements about inorder traversal of a Binary Search Tree are correct?
BST ordering is left < root < right. Therefore inorder traversal produces non-decreasing order, and with distinct keys it is strictly increasing. All three statements are correct.
What property is guaranteed by performing an Inorder Traversal on a Binary Search Tree (BST)?
Because a BST enforces Left < Root < Right, an Inorder traversal (Left, Root, Right) processes keys in non-decreasing sorted order.
Which of the following statements about searching in balanced AVL and Red-Black trees are correct?
AVL and Red-Black trees maintain logarithmic height through their balancing rules, giving O(log N) worst-case search. All three statements are correct.
What is the time complexity to search for a key in a balanced AVL Tree or Red-Black Tree with N nodes?
Self-balancing binary search trees maintain height bounded by O(log N), guaranteeing search, insertion, and deletion in O(log N) worst-case time.