Multiple choice

The Quick sort algorithm requires a maximum of ______ stack space in the worst case

  1. O(n)

  2. O(m)

  3. O(logn)

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Quick sort is a recursive algorithm. In the worst case (e.g., already sorted array with poor pivot selection), the recursion depth can reach O(n), requiring O(n) stack space.