Quick Sort Question Leetcode Sql Problems