Leetcode Selection Sort Complexity