GATE CS 2014, set 3 · Question 24 · Algorithms · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
You have an array of n elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is
- (A) O(n²)
- (B) O(n log n)
- (C) Θ(n log n)
- (D) O(n³)
Answer
Answer (A)
Answer from the official GATE CS 2014 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes