Why does the recursive implementation of quicksort require O(log n) of additional space?

1 answer

Answer

1091576

2026-07-11 06:45

+ Follow

The recursive implementation of quicksort requires O(log n) of additional space because it uses the call stack to keep track of subarrays being sorted. Each recursive call adds a new frame to the call stack, and the maximum depth of the call stack is O(log n) in the average case.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.