Consider the following tree diagram which of the following


QUESTION 1

If both of the child references of a binary tree node are non-null, it follows that the node must be ____.

a root node

a leaf node

a child node

an interior node

QUESTION 2

Which of the following statements about binary trees is correct?

Each node in a binary tree has at least two child nodes.

Each node in a binary tree has at most two child nodes.

The number of child nodes for each node in a binary tree is any power of two.

If divided down the middle from top to bottom, a binary tree must be symmetrical.

QUESTION 3

Consider the following tree diagram:

Which of the following nodes are leaf nodes?

C

B

H

B and H

QUESTION 4

Consider the following tree diagram:

Which of the following nodes are parent nodes?

C

C and R

R and D

C, R, and D

QUESTION 5

Consider the following binary search tree diagram:

Which of the following trees represents the correct result after inserting element T?

I

II

III

IV

QUESTION 6

Consider the following tree diagram:

What is the height of this tree?

3

4

5

7

QUESTION 7

What does the left node reference of a newly inserted binary search tree node get set to?

depends where the node is inserted

it gets set to the left child of the new node, if one exists

always null

it gets set to the left child of the root, if it exists

QUESTION 8

What are the differences between preorder, postorder, and inorder traversals?

The order in which we visit the left and right subtrees

Preorder only visits the left subtree

Postorder only visits the right subtree

The order of the root visit

QUESTION 9

Consider the following tree diagrams:

Which of the above are binary search trees?

I

II

I and II

Neither I nor II

QUESTION 10

Consider the following tree diagram:

What is the height of this tree?

3

4

6

7

QUESTION 11

Consider the following tree diagram:

Which of the following statements is NOT correct?

Nodes D and K form a subtree

Nodes H, M, and X form a subtree

Nodes R and N form a subtree

Nodes L and T form a subtree

QUESTION 12

Consider the following tree diagrams:

Which are binary search trees?

I

II

I and II

Neither I nor II

QUESTION 13

Consider the following binary search tree diagram:

Which nodes will be visited in order to insert the letter B into this tree?

H

H and D

H, D, and F

H, D, and A

QUESTION 14

If the child references of a binary tree node are both null, the node is ____.

a root node

a leaf node

a parent node

an interior node

QUESTION 15

Consider the following tree diagrams:

Which of these trees is considered to be balanced?

I

I and II

II and III

I and III

QUESTION 16

Consider the following tree diagrams:

Which of these trees is considered to be unbalanced?

I

II

III

II and III

QUESTION 17

Consider the following tree diagrams:

Which of the above are binary trees?

I

II

I and II

Neither I nor II

QUESTION 18

Consider the following tree diagram:

Which of the following statements is NOT correct?

R is an ancestor of N

C is an ancestor of N

D is an ancestor of P

H is an ancestor of M

QUESTION 19

Consider the following tree diagram:

Which of the following nodes are siblings?

D and U

H and M

D and B

L and T

QUESTION 20

Which action(s) will invalidate a min-heap so that, it may no longer have the properties of a min-heap?

I change the value of the root node

II remove the lowest level, right-most node

III remove the lowest level, left-most node

III

I and II

II and III

I and III

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Consider the following tree diagram which of the following
Reference No:- TGS02910565

Expected delivery within 24 Hours