In an array queue, data is stored in an ____ element.
A -
constructor
B -
array
C -
Node
D -
linked list
2-
In a certain card game, cards are distributed into seven separate piles. The rules of the
game permit selecting a card in one pile and moving it, together with all cards on top of it, to the
top of another pile. The cards that are moved are not to be reordered.
Of the following data structures, which would be most appropriate to use in simulating this
aspect of such a game?
A -
seven sets
B -
seven queues
C -
seven stacks
D -
seven one-dimensional vectors
3-
In a quick sort, what is the distinguished item called that the list surrounds once divided
into two parts?
A -
obstruction
B -
button
C -
pivot
D -
center
4-
Insert the following values into an initially empty #
5 12 9 13 26 8 1 6 14 23 15
Which node is the left child of the root?
A -
12
B -
6
C -
5
D -
9
5-
: Insert the following values into an initially empty #
5 12 9 13 26 8 1 6 14 23 15
Which is the length of the path between the root and node 23?
A -
1
B -
2
C -
3
D -
4
6-
Insert the following values into an initially empty #
5 12 9 13 26 8 1 6 14 23 15
What are the values of the chilldren #
A -
null, 13
B -
6, null
C -
5, null
D -
null, 14
7-
Insert the following values into an initially empty #
5 12 9 13 26 8 1 6 14 23 15
Which many nodes have only one child?
A -
5
B -
4
C -
3
D -
2
8-
: int j;
Char c=1;
j=(c<=9) && (c>=0);
The value of j after running
A -
3
B -
0
C -
2
D -
1
9-
int result (int m, int n) {
int j, temp = 1;
for (j=1; j<=n; j++)
temp *= m;
return temp;
}
What does this method do?
A -
it computes the roots of a quadratic with positive coefficients and with leading coefficient 1
B -
it approximates the n (th) root of m
C -
it computes the m (th) power of n
D -
it computes the n (th) power of m
10-
int Woe (int n, m)
{
if (m = = 1)
return n;
if (n = =m)
return 1;
return (Wow(n – 1, m – 1) + Wow (n – 1, m);
}
Wow(5 , 2) will return which of the following?