Multiple Choice
Consider the following binary search tree diagram: Consider the following addNode method for inserting a newNode into a binary search tree:
public void addNode(Node newNode)
{
int comp = newnode.data.compareTo(data) ;
if (comp < 0)
{
if (left == null) {left = newNode;}
else { left.addNode(newNode) ; }
}
else
{
if (right == null) {right = newNode;}
else { right.addNode(newNode) ; }
}
}
Which nodes will be visited in order to insert the letter E into this tree, calling addNode on the root of the tree?
A) H only
B) H and D only
C) H, D, and A
D) H, D, and F
Correct Answer:

Verified
Correct Answer:
Verified
Q59: Which of the following statements about removing
Q60: The height h of a completely filled
Q61: Consider the following tree diagram: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q62: Which of the following statements about a
Q63: Consider the following tree diagrams: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q65: Consider the following tree diagram: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q66: If the postorder traversal of an expression
Q67: Consider the following Huffman encoding tree: <img
Q68: A completely filled binary tree with a
Q69: Consider the following tree diagrams: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"