Sort An Array Leetcode Problem