adplus-dvertising
1. Stack is used for
a. CPU Resource Allocation
b. Breadth First Traversal
c. Recursion
d. None of the above
Discuss
Answer: (c).Recursion

2. push() and pop() functions are found in
a. queues
b. lists
c. stacks
d. trees
Discuss
Answer: (c).stacks

3. Minimum number of queues required for priority queue implementation?
a. 5
b. 4
c. 3
d. 2
Discuss
Answer: (d).2

4. What data structure is used for breadth first traversal of a graph?
a. queue
b. stack
c. list
d. none of the above
Discuss
Answer: (a).queue

5. A queue data-structure can be used for −
a. expression parsing
b. recursion
c. resource allocation
d. all of the above
Discuss
Answer: (c).resource allocation

6. If locality is a concern, you can use _______ to traverse the graph.
a. Breadth First Search
b. Depth First Search
c. Either BFS or DFS
d. None of the above!
Discuss
Answer: (b).Depth First Search

7. Aposterior analysis are more accurate than apriori analysis because −
a. it contains the real data.
b. it assumes all other factors to be dynamic.
c. it assumes all other factors to be constant.
d. it is a result of reverse-engineering.
Discuss
Answer: (b).it assumes all other factors to be dynamic.

8. Prefix notation is also known as
a. Reverse Polish Notation
b. Reverse Notation
c. Polish Reverse Notation
d. Polish Notation
Discuss
Answer: (d).Polish Notation

9. In conversion from prefix to postfix using stack data-structure, if operators and operands are pushed and popped exactly once, then the run-time complexity is
a. Ο(1)
b. Ο(n)
c. Ο(log n)
d. Ο(n2)
Discuss
Answer: (b).Ο(n)

10. If queue is implemented using arrays, what would be the worst run time complexity of queue and dequeue operations?
a. Ο(n), Ο(n)
b. Ο(n), Ο(1)
c. Ο(1), Ο(n)
d. Ο(1), Ο(1)
Discuss
Answer: (d).Ο(1), Ο(1)

Page 1 of 25