Implement a quick sort algorithm and explain its time and space complexity.
Implement quick_sort(arr) to sort an array of integers in ascending order. The function should sort the input list in place and return the same list. Do not call Python's built-in sorting functions. Explain the partition strategy and the average and worst-case time and auxiliary space complexity.
def quick_sort(arr):