Multiple Choice Questions

Multiple Choice Questions on Data Structure and Algorithm Design

Q1. Which of the following versions of merge sort algorithm does uses space efficiently?
(a) Contiguous version
(b) Array version

(d) Structure version
(e) Heap version.

Q2. What would be the cost value for any answering node of a sub tree with root ‘r’ using branch-bound algorithm?
(a) Maximum
(b) Minimum
(c) Optimal
(d) Average

Q3. Name the node which has been generated but none of its children nodes have been generated in state space tree of backtracking method.
(b) Live node
(c) E-Node
(d) State Node

Q4. This algorithm scans the list by swapping the entries whenever pair of adjacent keys are out of desired order.
(a) Insertion sort.
(b) Bubble sort.
(c) Shell sort.
(d) Quick sort.

Q5. From the following chose the one which belongs to the algorithm paradigm other than to which others from the following belongs to.
(a) Minimum & Maximum problem.
(b) Knapsack problem.
(c) Selection problem.
(d) Merge sort.

Q6. What is the type of the algorithm used in solving the 4 Queens problem?

(a) Greedy
(b) Dynamic
(c) Branch and Bound
(d) Backtracking.

Q7. Worst case efficiency of which search is O(n)?
(a) Sequential search
(b) Binary search
(c) Indexed search
(d) Hashing

Q8. Which of the following searching methods requires that all keys must reside in internal memory?
(a) Binary search
(b) Sequential search
(c) Hashing
(d) Depth first search

Q9. What term is used to describe an O(n) algorithm?
(a) Constant
(b) Non Polynomial Deterministic
(c) Logarithmic
(d) Linear.

Q10. Which of the following are essential statement types for describing algorithms?
(a) Sequence
(b) Selection
(c) Repetition
(d) All the above

Q11. When we say an algorithm has a time complexity of O (n), what does it mean?
(a) The algorithm has ‘n’ nested loops
(b) The computation time taken by the algorithm is proportional to n
(c) The algorithm is ‘n’ times slower than a standard algorithm
(d) There are ‘n’ number of statements in the algorithm

Q12. Can we read a data item at any location of a list within a constant time (i.e.
O(1))?
(a) Yes
(b) Yes, only if the list is implemented by pointers (i.e. linked-list)
(c) Yes, only if the list is implemented by an array

(d) No, we need O(n) computation steps no matter what kind of implementation is used

Q13. Find the odd one out.
(a) Merge Sort
(b)TVSP Problem
(c) KnapSack Problem
(d) OBST Problem

Q14. Breadth first search uses __________ as an auxiliary structure to hold nodes for future processing.
(a) Stack
(c) Graph
(d) Queue.

Q15. From the following pick the one which does not belongs to the same paradigm to which others belongs to.
(a) Minimum & Maximum problem
(b) Knapsack problem
(c) Selection problem
(d) Merge sort

Q16. Prim's algorithm is based on _____________ method
a. Divide and conquer method
b.Greedy method
c.Dynamic programming
d.Branch and bound

Q17. The amount of memory needs to run to completion is known as_____________
a.Space complexity

b.Time complexity
c.Worst case
d.Best case

Thanks
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..