Algorithm: MCQ Set – 10

Q91: Which of the following sorting algorithm is of divide-and-conquer type?

  • (A) Bubble sort
  • (B) Insertion sort
  • (C) Quick sort
  • (D) All of above

Q92: For merging two sorted lists of sizes m and n into a sorted list of size m + n, we require comparisons of

  • (A) O(m)
  • (B) O(n)
  • (C) O(m + n)
  • (D) O(log(m) + log(n))

Q93: Travelling Salesman Problem is

  • (A) NP Problem
  • (B) P Problem
  • (C) Halting Problem
  • (D) All of Above

Q94: for(i=1 ; i<=n ; i++) {printf(“**”); } The above C code has Time Complexity of

  • (A) 1
  • (B) log(n)
  • (C) n log(n)
  • (D) n

Q95: The running time of the following sorting algorithm depends on whether the partitioning is balanced or unbalanced

  • (A) Insertion sort
  • (B) Selection Sort
  • (C) Quick Sort
  • (D) Merge Sort

Q96: Which of the following sorts have a O(n log(n)) Worst case performance?

  • (A) Insertion Sort
  • (B) Quick Sort
  • (C) Heap Sort
  • (D) None of these

Q97: Time Complexity of Recursive Fibonacci algorithm is

  • (A) O(n2)
  • (B) O(n3)
  • (C) O(n2 log(n) )
  • (D) O(Cn), where C is a constant

Q98: Recursive procedures are implemented by using ____ data structure.

  • (A) Queues
  • (B) Stacks
  • (C) Linked Lists
  • (D) Strings

Q99: For merging two sorted lists of size m and n into a sorted size of m+n, we require comparisons of 

  • (A) O(m)
  • (B) O(n)
  • (C) O(m+n)
  • (D) O(log(m) + log(n ))

Q100: An algorithm

  • (A) Is a finite set of instructions
  • (B) Any well defined computational procedure
  • (C) Zero or more quantities are externally supplied and at least one quantity is produced.
  • (D) All are correct



≪ Previous | Next ≫