Leetcode Selection Sort Question