Quick Sort Question Leetcode Problems Python