Deck 20: Binary Trees

ملء الشاشة (f)
exit full mode
سؤال
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
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
Stepping through the nodes of a tree is known as:

A) climbing
B) traversing
C) walking through
D) branching out
E) None of these
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
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
سؤال
Binary trees can be divided into

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

A) recursion
B) no pointers
C) no arguments
D) no parameters
E) None of these
سؤال
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
سؤال
The height of a tree describes how many levels there are in the tree.
سؤال
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
سؤال
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.
سؤال
Binary trees are commonly used to organize key values that index database records.
سؤال
Methods of traversing a tree are:

A) Inorder traversal
B) Preorder traversal
C) Postorder traversal
D) All of these
E) None of these
سؤال
All nodes to the right of a node hold values greater than the node's value.
سؤال
Dereferencing a pointer to a pointer gives you another pointer.
سؤال
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
سؤال
The width of a tree is the largest number of nodes in the same level.
سؤال
A subtree is an entire branch of a tree, from one particular node down.
سؤال
Deleting a leaf node from a binary tree is not difficult. Deleting a non-leaf node requires several steps.
سؤال
Output will be the same if you use inorder, postorder, or preorder traversals of the same binary tree.
سؤال
In a binary tree, each node must have a minimum of two children.
سؤال
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 Deck
1/38
auto play flashcards
العب
simple tutorial
ملء الشاشة (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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
20
Binary trees can be divided into

A) branches
B) leaves
C) subtrees
D) sawdust
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
21
The binary tree structure is called a "tree" because it resembles an upside-down tree.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
22
To remove a node that has children, you must first remove the children.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
25
The height of a tree describes how many levels there are in the tree.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
28
Binary trees are commonly used to organize key values that index database records.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
30
All nodes to the right of a node hold values greater than the node's value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
31
Dereferencing a pointer to a pointer gives you another pointer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
33
The width of a tree is the largest number of nodes in the same level.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
34
A subtree is an entire branch of a tree, from one particular node down.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
35
Deleting a leaf node from a binary tree is not difficult. Deleting a non-leaf node requires several steps.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
36
Output will be the same if you use inorder, postorder, or preorder traversals of the same binary tree.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
37
In a binary tree, each node must have a minimum of two children.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 38 في هذه المجموعة.