Search
Question: Which traversal method is best for printing the nodes of a binary tree level by level?Opti..
Question: How many leaf nodes can a binary tree with n internal nodes have?Options: n + 1n2nn - 1Cor..
Question: What is the post-order traversal of the binary tree with root A, left child B, and right c..
Question: Which of the following is true about a complete binary tree?Options: All levels are fully ..
Question: In which traversal method are nodes visited in the order of left child, root, right child?..
Question: Which traversal method visits the root node first in a binary tree?Options: In-orderPost-o..
Question: What is the maximum number of nodes in a binary tree of height h?Options: h2^h - 12^hh^2Co..
Question: What is a common use case for Red-Black trees?Options: Memory managementImplementing assoc..
Question: What happens when an AVL tree becomes unbalanced after an insertion?Options: It is deleted..
Question: Which of the following operations is not allowed in a Red-Black tree?Options: InsertionDel..
Question: How many rotations are needed in the worst case when inserting a node into an AVL tree?Opt..
Question: What happens when you insert a node into an AVL tree that causes it to become unbalanced?O..
Question: Which operation is guaranteed to take O(log n) time in a Red-Black tree?Options: Insertion..
Question: Which of the following is a valid sequence of colors for a Red-Black tree?Options: Red, Re..
Question: What is the primary purpose of balancing in AVL and Red-Black trees?Options: To reduce mem..
Question: Which of the following is a valid property of AVL trees?Options: The height difference bet..
Question: What happens to the balance factor of an AVL tree after a right rotation?Options: It incre..
Question: How does an AVL tree maintain balance after an insertion?Options: By performing rotations...
Question: What is the worst-case time complexity for inserting an element into a Red-Black tree?Opti..
Question: Which traversal method is commonly used to retrieve elements in sorted order from a binary..
Question: Which of the following scenarios is best suited for using a Red-Black tree?Options: When f..
Question: What happens to the balance factor of an AVL tree node after a right rotation?Options: It ..
Question: Which operation is NOT performed in a Red-Black tree during insertion?Options: Coloring th..
Question: Which of the following is true about the balancing of AVL trees?Options: They require rota..
Question: When inserting a node into an AVL tree, what must be checked after insertion?Options: If t..
Question: What color is the root node of a Red-Black tree?Options: RedBlackIt can be eitherNone of t..
Question: Which of the following statements about AVL and Red-Black trees is true?Options: AVL trees..
Question: What is a common use case for Red-Black trees in real-world applications?Options: Memory m..
Question: What is the primary advantage of using balanced trees like AVL and Red-Black trees?Options..
Question: Which operation is more complex in AVL trees compared to Red-Black trees?Options: Insertio..