Deck 20: Binary Trees

Full screen (f)
exit full mode
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
Use Space or
up arrow
down arrow
to flip the card.
Question
The head pointer, anchored at the top of a binary tree, is called the ________.

A)root node
B)tree pointer
C)binary pointer
D)Either A or C
E)None of these
Question
Binary trees can be divided into:

A)branches
B)leaves
C)subtrees
D)sawdust
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
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 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
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
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 process of stepping through the nodes of a binary tree is known as ________.

A)climbing
B)traversing
C)walking through
D)branching out
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
A node that has no children is known as a ________.

A)root node
B)head node
C)leaf node
D)pure binary node
E)None of these
Question
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)it is more flexible than the Unary Tree structure
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
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)a null pointer
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 working with 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
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
Question
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
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
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)a null pointer
E)None of these
Question
Output will be the same if you use inorder, postorder, or preorder traversals of the same binary tree.
Question
To remove a node that has children, you must first remove the children.
Question
The width of a tree is the largest number of nodes in the same level.
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
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
Binary trees are commonly used to organize key values that index database records.
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, and then traversing the node's right subtree.
Question
The height of a tree describes how many levels there are in the tree.
Question
Deleting a leaf node from a binary tree is not difficult. Deleting a non-leaf node requires several steps.
Question
The binary tree structure is called a "tree" because it resembles an upside-down tree.
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
All nodes to the right of a node hold values greater than the node's value.
Question
A subtree is an entire branch of a tree, from one particular node down.
Question
Dereferencing a pointer to a pointer gives you another pointer.
Question
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
Question
The 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
Methods of traversing a binary tree are:

A)inorder traversal
B)preorder traversal
C)postorder traversal
D)All of these
E)None of these
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
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
the root node
2
The head pointer, anchored at the top of a binary tree, is called the ________.

A)root node
B)tree pointer
C)binary pointer
D)Either A or C
E)None of these
tree pointer
3
Binary trees can be divided into:

A)branches
B)leaves
C)subtrees
D)sawdust
E)None of these
subtrees
4
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
5
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
6
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
7
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
8
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
9
The process of stepping through the nodes of a binary 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
10
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
11
A node that has no children is known as 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
12
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)it is more flexible than the Unary Tree structure
E)None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
13
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
14
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)a null pointer
E)None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
15
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
16
When working with 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
17
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
18
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
19
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
20
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)a null pointer
E)None of these
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
21
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
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
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
24
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
25
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
26
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
27
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
28
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.
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
29
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
30
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
31
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
32
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
33
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
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
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
36
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
Unlock Deck
Unlock for access to all 38 flashcards in this deck.
Unlock Deck
k this deck
37
The 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
38
Methods of traversing a binary 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
locked card icon
Unlock Deck
Unlock for access to all 38 flashcards in this deck.