1-
|
Which data structure allows deleting data elements from front and inserting at rear?
|
|
A -
|
Deques
|
|
B -
|
Stacks
|
|
C -
|
Queues
|
|
D -
|
Binary search tree
|
2-
|
Which of the following acronyms describe the behaviour of a stack?
|
|
A -
|
FIFI
|
|
B -
|
LIFO
|
|
C -
|
LIFER
|
|
D -
|
FIFO
|
3-
|
Which of the following statements is true regarding a queue?
|
|
A -
|
It may be implemented by a linked list because insertions and deletions may be from the same end
|
|
B -
|
It may be implemented by an array without providing for wrap-around
|
|
C -
|
It may be implemented by a heap because first in is first out
|
|
D -
|
It may be implemented either by an array or a linked list
|
4-
|
Which of the following is true of stacks and queues?
|
|
A -
|
A stack is a last-in, first-out structure, and queue is a random access structure
|
|
B -
|
A queue is a last-in, first-out structure, and stack is a first-in, first-out structure
|
|
C -
|
A stack is a last-in, first-out structure, and queue is a first-in, first-out structure
|
|
D -
|
A stack is a last-in, first-out structure, and both structures are random access structures
|
5-
|
Which data structure is used to check for balanced parentheses?
|
|
A -
|
priority queue
|
|
B -
|
queue
|
|
C -
|
stack
|
|
D -
|
binary search tree
|
6-
|
Which of the following stack operations could result in stack underflow?
|
|
A -
|
All of the others answers
|
|
B -
|
Push
|
|
C -
|
Pop
|
|
D -
|
Is_empty
|
7-
|
Which of the following best describes the data structure used to keep track of function
calls as your program is run?
|
|
A -
|
Array
|
|
B -
|
Queue
|
|
C -
|
Linked list
|
|
D -
|
Stack
|
8-
|
Which of the following operations is not effeciently supported by a singly linked list?
|
|
A -
|
Accessing thr element in the current position
|
|
B -
|
Insertion before the current position
|
|
C -
|
Insertion after the current position
|
|
D -
|
Moving to the position immediately following the current position
|
9-
|
Which boolean expression indicates whether the numbers intwo IntNodes (p and q) are
the same? Assume that neither p nor q is null
|
|
A -
|
p = = q
|
|
B -
|
p.data = = q.data
|
|
C -
|
None of the others answers
|
|
D -
|
p.link = = q.link
|
10-
|
Which is not considered a variation of a sequential search?
|
|
A -
|
Searching an unsorted list for the first occurrence of a value
|
|
B -
|
Searching a sorted list fot the first occurrence of a value
|
|
C -
|
Searching a sorted list for all occurrences of a value
|
|
D -
|
Searching an unsorted list for the last occurrence of a value
|