Quick Sort Question Leetcode Python