Question: QUESTION 1 A __________ function is one that calls itself dynamic static recursive data validation 1 points QUESTION 2 A binary tree can be created
QUESTION 1
A __________ function is one that calls itself
| dynamic | ||
| static | ||
| recursive | ||
| data validation |
1 points
QUESTION 2
A binary tree can be created using a struct or class containing a data value and
| a pointer to the first child node | ||
| a pointer to the last child node | ||
| two pointers, one for the left child and one for the right child | ||
| two data nodes |
1 points
QUESTION 3
A node that has no children is a
| root node | ||
| leaf node | ||
| head node | ||
| pure binary node |
1 points
QUESTION 4
A recursive function that does not have a termination will eventually
| return 0 and stop | ||
| return false and stop | ||
| cause the program to crash | ||
| reach the Null terminator and stop |
1 points
QUESTION 5
A tree with a height of three has:
| three subtrees | ||
| six nodes | ||
| one root and three nodes with two children each | ||
| four levels |
1 points
QUESTION 6
All node pointers that do not point to other nodes are set to
| root of the tree | ||
| a parent node | ||
| their left most child node | ||
| NULL (0) |
1 points
QUESTION 7
How many times will the following function call itself, if 5 is passed as the argument?
void showMessage(int n)
{
if (n > 0)
{
cout << "Good day!" << endl;
showMessage(n - 1);
}
}
| 6 | ||
| 4 | ||
| 5 | ||
| an infinite number of times |
1 points
QUESTION 8
How many times will the following function call itself, if 5 is passed as the argument?
void showMessage(int n)
{
if (n > 0)
{
cout << "Good day!" << endl;
showMessage(n + 1);
}
}
| 4 | ||
| 5 | ||
| 6 | ||
| an infinite number of times before program crashes |
1 points
QUESTION 9
In a binary tree, each node may point to ____________ other nodes.
| 0 | ||
| 1 | ||
| 2 | ||
| All of these |
1 points
QUESTION 10
Methods of traversing a tree are:
| inorder traversal | ||
| postorder traversal | ||
| preorder traversal | ||
| All of these |
1 points
QUESTION 11
The MergeSort algorithm works on the basis of
| three sublists | ||
| two sublists | ||
| one pivot and 2 sublists | ||
| 2 pivots |
1 points
QUESTION 12
The __________ algorithm uses recursion to efficiently sort a list.
| bubble sort | ||
| selection sort | ||
| insertion sort | ||
| merge sort |
1 points
QUESTION 13
The first node in a binary tree list is called the
| head pointer | ||
| binary node | ||
| root node | ||
| pointer node |
1 points
QUESTION 14
The programmer must ensure that a recursive function does not become:
| a static function | ||
| a prototyped function | ||
| like an endless loop | ||
| dynamic function |
1 points
QUESTION 15
Values are typically stored in a binary search tree so that a node's _________ child holds data that is less than the ___________ data.
| right, node's | ||
| left, node's | ||
| right, left child's | ||
| None of above |
1 points
QUESTION 16
When a binary tree is used to facilitate a search, it is referred to as a:
| binary queue | ||
| binary ordered queue | ||
| binary search tree | ||
| search tree |
1 points
QUESTION 17
When an application begins searching a binary tree, it starts at:
| the root node | ||
| the outermost leaf node | ||
| the middle node, halfway between the root and the longest branch | ||
| the rightmost child of the root node |
1 points
QUESTION 18
Root node is always an internal node
True
False
1 points
QUESTION 19
In a tree, every node can have at most one parent node
True
False
1 points
QUESTION 20
Selection Sort, Insertion Sort, Bubble Sort all can be used on linked list
True
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
