Quick Sort Question Leetcode Javascript Interview