Space complexity of Sum of Three Values

The space complexity of this solution can range from O(log(n)) to O(n), as per the sorting algorithm we use.

If we used heapsort, would the space complexity be O(1)?


Course: https://www.educative.io/courses/grokking-coding-interview-patterns-python
Lesson: https://www.educative.io/courses/grokking-coding-interview-patterns-python/solution-sum-of-three-values