Q. In Quick Sort, what is the effect of choosing a bad pivot?
-
A.
Increased space complexity
-
B.
Increased time complexity
-
C.
Decreased time complexity
-
D.
No effect
Solution
Choosing a bad pivot can lead to increased time complexity, potentially degrading to O(n^2) in the worst case.
Correct Answer:
B
— Increased time complexity
Learn More →
Q. Which of the following is true about Quick Sort?
-
A.
It is always faster than Merge Sort
-
B.
It is not in-place
-
C.
It can be implemented using recursion
-
D.
It is stable
Solution
Quick Sort can be implemented using recursion, although it is not a stable sorting algorithm.
Correct Answer:
C
— It can be implemented using recursion
Learn More →
Showing 1 to 2 of 2 (1 Pages)