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 B into this tree, calling addNode on the root of the tree?
A) H, D, and A
B) H and D only
C) H only
D) H, D, and F
Correct Answer:

Verified
Correct Answer:
Verified
Q83: Insert the missing code in the following
Q84: Consider the following tree diagrams: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q85: Consider the following binary search tree diagram:
Q86: Consider the following tree diagram: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TB7392/.jpg"
Q87: A min-heap is a binary tree structure
Q89: You are using a tree to show
Q90: Consider the following binary search tree diagram:
Q91: A completely filled binary tree with a
Q92: Consider a balanced binary tree with 520
Q93: Which of the following statements about trees