Leetcode Selection Sort Complexity Analysis