Deck 20: Binary Trees

Full screen (f)
exit full mode
Question
A binary tree can be created using a struct or class containing a data value and

A) a pointer to the first child node
B) a pointer to the last child node
C) two pointers, one for the left child and one for the right child
D) two data nodes
E) None of these
Use Space or
up arrow
down arrow
to flip the card.
Question
A strong 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) it is more flexible than the Unary Tree structure
E) None of these
Question
The head pointer, anchored at the top of a tree, is called the

A) root node
B) tree pointer
C) binary pointer
D) either a or c
E) None of these
Question
All node pointers that do not point to other nodes are set to

A) the root of the tree
B) a parent node
C) their left-most child node
D) NULL
E) None of these
Question
A node that has no children is a

A) root node
B) head node
C) leaf node
D) pure binary node
E) None of these
Question
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
Question
Deleting a node that has two children offers an opportunity to use

A) a function that returns a pointer to a pointer
B) a function parameter that is a pointer to a pointer
C) double indirection
D) All of these
E) None of these
Question
Binary trees may be implemented as templates, but any data types used with them must support the ______________ operator.

A) <
B) >
C) ==
D) All of these
E) None of these
Question
When a binary tree is used to facilitate a search, it is referred to as a:

A) binary queue
B) binary ordered deque
C) binary search tree
D) sort algorithm
E) None of these
Question
In a binary tree, each node may point to ____________ other nodes.

A) no
B) one
C) two
D) All of these
E) None of these
Question
Stepping through the nodes of a tree is known as:

A) climbing
B) traversing
C) walking through
D) branching out
E) None of these
Question
An operation that can be performed on a binary search tree is

A) insertion
B) finding
C) deleting
D) All of these
E) None of these
Question
Values are typically stored in a binary search tree so that a node's _________ child holds data 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
Question
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
Question
In a binary tree, a node that has more than two children:

A) will be cut back by the compiler
B) is theoretically impossible in a correctly-developed binary tree structure
C) is known as a triplet node
D) None of these
Question
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
Question
When you dereference a pointer to a pointer, the result is:

A) a value of the data type pointed to
B) another pointer
C) not possible to determine
D) NULL
E) None of these
Question
The root node points to two other nodes, referred to as

A) child nodes, or children
B) parent nodes, or parents
C) binary nodes
D) subnodes
E) None of these
Question
When an application begins searching a binary tree, it starts at:

A) the outermost leaf node
B) the middle node, halfway between the root and the longest branch
C) the root node
D) the rightmost child of the root node
E) None of these
Question
Binary trees can be divided into

A) branches
B) leaves
C) subtrees
D) sawdust
E) None of these
Question
The binary tree structure is called a "tree" because it resembles an upside-down tree.
Question
To remove a node that has children, you must first remove the children.
Question
Inorder, Preorder, and Postorder traversals can be accomplished using _____.

A) recursion
B) no pointers
C) no arguments
D) no parameters
E) None of these
Question
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
Question
The height of a tree describes how many levels there are in the tree.
Question
In a binary tree class, you usually have a pointer as a member that is set to:

A) the leftmost child node
B) the first leaf node
C) the root of the tree
D) the deepest leaf node
E) None of these
Question
The preorder method of traversing a binary tree involves processing the node's data, traversing the node's left subtree, then traversing the node's right subtree.
Question
Binary trees are commonly used to organize key values that index database records.
Question
Methods of traversing a tree are:

A) Inorder traversal
B) Preorder traversal
C) Postorder traversal
D) All of these
E) None of these
Question
All nodes to the right of a node hold values greater than the node's value.
Question
Dereferencing a pointer to a pointer gives you another pointer.
Question
A 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
Question
The width of a tree is the largest number of nodes in the same level.
Question
A subtree is an entire branch of a tree, from one particular node down.
Question
Deleting a leaf node from a binary tree is not difficult. Deleting a non-leaf node requires several steps.
Question
Output will be the same if you use inorder, postorder, or preorder traversals of the same binary tree.
Question
In a binary tree, each node must have a minimum of two children.
Question
The inorder method of traversing a binary tree involves traversing the node's left subtree, processing the node's data, then traversing the node's right subtree.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/38
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 20: Binary Trees
1
A binary tree can be created using a struct or class containing a data value and

A) a pointer to the first child node
B) a pointer to the last child node
C) two pointers, one for the left child and one for the right child
D) two data nodes
E) None of these
C
2
A strong 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) it is more flexible than the Unary Tree structure
E) None of these
A
3
The head pointer, anchored at the top of a tree, is called the

A) root node
B) tree pointer
C) binary pointer
D) either a or c
E) None of these
B
4
All node pointers that do not point to other nodes are set to

A) the root of the tree
B) a parent node
C) their left-most child node
D) NULL
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
5
A node that has no children is a

A) root node
B) head node
C) leaf node
D) pure binary node
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
6
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
7
Deleting a node that has two children offers an opportunity to use

A) a function that returns a pointer to a pointer
B) a function parameter that is a pointer to a pointer
C) double indirection
D) All of these
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
8
Binary trees may be implemented as templates, but any data types used with them must support the ______________ operator.

A) <
B) >
C) ==
D) All of these
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
9
When a binary tree is used to facilitate a search, it is referred to as a:

A) binary queue
B) binary ordered deque
C) binary search tree
D) sort algorithm
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
10
In a binary tree, each node may point to ____________ other nodes.

A) no
B) one
C) two
D) All of these
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
11
Stepping through the nodes of a tree is known as:

A) climbing
B) traversing
C) walking through
D) branching out
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
12
An operation that can be performed on a binary search tree is

A) insertion
B) finding
C) deleting
D) All of these
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
13
Values are typically stored in a binary search tree so that a node's _________ child holds data 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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
14
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
15
In a binary tree, a node that has more than two children:

A) will be cut back by the compiler
B) is theoretically impossible in a correctly-developed binary tree structure
C) is known as a triplet node
D) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
16
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
17
When you dereference a pointer to a pointer, the result is:

A) a value of the data type pointed to
B) another pointer
C) not possible to determine
D) NULL
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
18
The root node points to two other nodes, referred to as

A) child nodes, or children
B) parent nodes, or parents
C) binary nodes
D) subnodes
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
19
When an application begins searching a binary tree, it starts at:

A) the outermost leaf node
B) the middle node, halfway between the root and the longest branch
C) the root node
D) the rightmost child of the root node
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
20
Binary trees can be divided into

A) branches
B) leaves
C) subtrees
D) sawdust
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
21
The binary tree structure is called a "tree" because it resembles an upside-down tree.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
22
To remove a node that has children, you must first remove the children.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
23
Inorder, Preorder, and Postorder traversals can be accomplished using _____.

A) recursion
B) no pointers
C) no arguments
D) no parameters
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
24
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
25
The height of a tree describes how many levels there are in the tree.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
26
In a binary tree class, you usually have a pointer as a member that is set to:

A) the leftmost child node
B) the first leaf node
C) the root of the tree
D) the deepest leaf node
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
27
The preorder method of traversing a binary tree involves processing the node's data, traversing the node's left subtree, then traversing the node's right subtree.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
28
Binary trees are commonly used to organize key values that index database records.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
29
Methods of traversing a tree are:

A) Inorder traversal
B) Preorder traversal
C) Postorder traversal
D) All of these
E) None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
30
All nodes to the right of a node hold values greater than the node's value.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
31
Dereferencing a pointer to a pointer gives you another pointer.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
32
A 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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
33
The width of a tree is the largest number of nodes in the same level.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
34
A subtree is an entire branch of a tree, from one particular node down.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
35
Deleting a leaf node from a binary tree is not difficult. Deleting a non-leaf node requires several steps.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
36
Output will be the same if you use inorder, postorder, or preorder traversals of the same binary tree.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
37
In a binary tree, each node must have a minimum of two children.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
38
The inorder method of traversing a binary tree involves traversing the node's left subtree, processing the node's data, then traversing the node's right subtree.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 38 flashcards in this deck.