Filters
Question type

Study Flashcards

A good reason to use the binary tree structure is


A) to expedite the process of searching large sets of information
B) aesthetics and program design
C) code readability
D) that it is more flexible than the unary tree structure
E) None of these

F) A) and E)
G) B) and C)

Correct Answer

verifed

verified

Select all that apply. Which of the following are methods of traversing a binary tree?


A) LeftOrder traversal
B) PreOrder traversal
C) FrontOrder traversal
D) InOrder traversal
E) PostOrder traversal

F) A) and D)
G) A) and E)

Correct Answer

verifed

verified

The InOrder method of traversing a binary tree involves traversing the node's left subtree, processing the node's data, and then traversing the node's right subtree.

A) True
B) False

Correct Answer

verifed

verified

Values are typically stored in a binary search tree so that a node's __________ child holds data that is less than the __________ data.


A) right, node's
B) left, node's
C) right, left child's
D) left, right child's
E) None of these

F) A) and E)
G) A) and D)

Correct Answer

verifed

verified

Deleting a leaf node from a binary tree is not difficult but deleting a non-leaf node requires several steps.

A) True
B) False

Correct Answer

verifed

verified

The process of stepping through the nodes of a binary tree is known as


A) climbing
B) traversing
C) stepping through
D) branching out
E) None of these

F) A) and E)
G) B) and D)

Correct Answer

verifed

verified

The height of a tree describes how many levels there are in the tree.

A) True
B) False

Correct Answer

verifed

verified

The shape of a binary tree is


A) always triangular
B) always balanced
C) determined by the programmer
D) determined by the order in which values are inserted
E) None of these

F) B) and D)
G) B) and C)

Correct Answer

verifed

verified

D

When the root node points to two other nodes, the nodes are referred to as


A) child nodes, or children
B) parent nodes, or parents
C) binary nodes
D) subnodes
E) None of these

F) All of the above
G) B) and C)

Correct Answer

verifed

verified

A binary tree with a height of three has


A) six nodes
B) one root and three nodes with two children each
C) three levels
D) three subtrees
E) None of these

F) A) and C)
G) A) and B)

Correct Answer

verifed

verified

The binary tree structure is called a "tree" because it resembles an upside-down tree.

A) True
B) False

Correct Answer

verifed

verified

Select all that apply. The head pointer, anchored at the top of a binary tree, may be called the


A) root node
B) tree pointer
C) binary pointer
D) leaf pointer
E) node pointer

F) B) and C)
G) B) and D)

Correct Answer

verifed

verified

The intBinaryTree class has a public member function, findNode, that returns true if a value is not found and False if the value is found.

A) True
B) False

Correct Answer

verifed

verified

When you dereference a pointer to a pointer, the result is


A) a value of the data type that is pointed to
B) another pointer
C) not possible to determine
D) a null pointer
E) None of these

F) B) and D)
G) C) and D)

Correct Answer

verifed

verified

B

The __________ in a binary tree is similar to the head pointer in a linked list.


A) root pointer
B) leaf pointer
C) null pointer
D) binary pointer
E) None of these

F) B) and E)
G) A) and B)

Correct Answer

verifed

verified

In a binary tree class you usually have a pointer as a member that is set to the


A) leftmost child node
B) first leaf node
C) root of the tree
D) deepest leaf node
E) None of these

F) All of the above
G) None of the above

Correct Answer

verifed

verified

The first node in a binary tree list is called the


A) head pointer
B) binary node
C) root node
D) pointer node
E) None of these

F) A) and C)
G) A) and E)

Correct Answer

verifed

verified

In a non-linear linked list, a node can point to


A) only the next node in sequence
B) only the previous node in sequence
C) more than one other node, plus the previous node in sequence
D) all of the other nodes in the list
E) None of these

F) A) and C)
G) All of the above

Correct Answer

verifed

verified

The width of a tree is the largest number of nodes in the same level.

A) True
B) False

Correct Answer

verifed

verified

Select all that apply. Binary trees may be implemented as templates, but any data types used with them must support the __________ operator.


A) >
B) <
C) &&
D) ==
E) linked

F) C) and D)
G) A) and C)

Correct Answer

verifed

verified

A, B, D

Showing 1 - 20 of 39

Related Exams

Show Answer