Skip to main content

Design and Analysis of Algorithms MCQs with Answers

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

Chapter: 4
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)
Correct Answer: B
Chapter: 4
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
Correct Answer: A
Chapter: 4
Q83:
Which function is responsible for dividing the array based on the pivot?
A. QUICKSELECT
B. PARTITION
C. MERGE
D. SWAP
Correct Answer: B
Chapter: 4
Q84:
Fill in the blank: Quicksort is known for its ______ sorting time on average.
A. linear
B. logarithmic
C. quadratic
D. logarithmic-linear
Correct Answer: D
Chapter: 4
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²)
Correct Answer: D
Chapter: 4
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
Correct Answer: B
Chapter: 4
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
Correct Answer: B
Chapter: 4
Q88:
In the Quicksort algorithm, the PARTITION function will return the index of the ______ element.
A. smallest
B. largest
C. first
D. pivot
Correct Answer: D
Chapter: 4
Q89:
Which data structure does the pivots of Quicksort form during execution?
A. Binary Tree
B. Heap Tree
C. BST
D. Linked List
Correct Answer: C
Chapter: 4
Q90:
What type of algorithm is Quicksort?
A. Recursive
B. Iterative
C. Static
D. Non-deterministic
Correct Answer: A
Chapter: 4
Q91:
The average-case complexity of Quicksort is represented by ______.
A. Θ(n)
B. Θ(n²)
C. Θ(n log n)
D. Θ(log n)
Correct Answer: C
Chapter: 4
Q92:
Which part of the Quicksort algorithm takes Θ(n) time?
A. Merging
B. Partitioning
C. Insertion
D. Deletion
Correct Answer: B
Chapter: 4
Q93:
Which of the following represents the function that recursively sorts two subarrays?
A. QUICKSORT
B. PARTITION
C. SORT
D. BINARY_SORT
Correct Answer: A
Chapter: 4
Q94:
Which sorting algorithm uses no additional array for storage?
A. In-place sorting
B. Stable sorting
C. Merge sorting
D. Quick sorting
Correct Answer: A
Chapter: 4
Q95:
Which of the following sorting algorithms is stable?
A. Quicksort
B. Heapsort
C. Mergesort
D. Selection sort
Correct Answer: C
Chapter: 4
Q96:
What is the minimum time complexity for comparison-based sorting algorithms?
A. O(n)
B. O(n^2)
C. O(n log n)
D. Ω(n log n)
Correct Answer: D
Chapter: 4
Q97:
How many possible combinations exist when sorting three elements (a1, a2, a3)?
A. 3
B. 6
C. 9
D. 12
Correct Answer: B
Chapter: 4
Q98:
In sorting, which type of tree represents the comparison-based decision-making process?
A. Binary tree
B. Decision tree
C. Sorting tree
D. Trie
Correct Answer: B
Chapter: 4
Q99:
Which of the following is NOT an in-place sorting algorithm?
A. Bubble sort
B. Insertion sort
C. Selection sort
D. Mergesort
Correct Answer: D
Chapter: 4
Q100:
Which sorting algorithm is not stable but in-place?
A. Quick sort
B. Merge sort
C. Bubble sort
D. Insertion sort
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Design and Analysis of Algorithms

🚀 Start Quiz Now