Quick Sort Question Leetcode Javascript 30