Relative Sort Array Leetcode Question