Skip to main content

Design and Analysis of Algorithms MCQs with Answers

Practice important Design and Analysis of Algorithms MCQs with answers and explanations.

Multiple Choice Questions

Q81: What is the worst-case time complexity of Quicksort?
  • A: O(n log n)
  • B: O(n²)
  • C: O(n)
  • D: O(log n)
View Answer
B

Q82: In the PARTITION algorithm, what is the initial pivot value in an array?
  • A: A[p]
  • B: A[r]
  • C: Middle element
  • D: Random element
View Answer
A

Q83: Which function is responsible for dividing the array based on the pivot?
  • A: QUICKSELECT
  • B: PARTITION
  • C: MERGE
  • D: SWAP
View Answer
B

Q84: Fill in the blank: Quicksort is known for its ______ sorting time on average.
  • A: linear
  • B: logarithmic
  • C: quadratic
  • D: logarithmic-linear
View Answer
D

Q85: When the pivot selection results in unbalanced partitions, Quicksort’s performance becomes closer to ______.
  • A: O(n log n)
  • B: O(log n)
  • C: O(n)
  • D: O(n²)
View Answer
D

Q86: The running time of Quicksort depends on which of the following factors?
  • A: Array length
  • B: Pivot selection
  • C: Sort method
  • D: Memory usage
View Answer
B

Q87: If the pivot is chosen at the extremes in an unbalanced way, the Quicksort will operate at ______.
  • A: best-case performance
  • B: worst-case performance
  • C: average performance
  • D: stable performance
View Answer
B

Q88: In the Quicksort algorithm, the PARTITION function will return the index of the ______ element.
  • A: smallest
  • B: largest
  • C: first
  • D: pivot
View Answer
D

Q89: Which data structure does the pivots of Quicksort form during execution?
  • A: Binary Tree
  • B: Heap Tree
  • C: BST
  • D: Linked List
View Answer
C

Q90: What type of algorithm is Quicksort?
  • A: Recursive
  • B: Iterative
  • C: Static
  • D: Non-deterministic
View Answer
A

Test Your Knowledge

Take a timed quiz on Design and Analysis of Algorithms

🚀 Start Quiz Now