class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
for i in range(len(nums) - 1):
min_loc = i
for j in range(i+1, len(nums)):
if nums[j] < nums[min_loc]:
min_loc = j
nums[i], nums[min_loc] = nums[min_loc], nums[i]
return nums
n-1趟,每趟找无序区最小的元素放在无序区最前面,下一趟无序区范围减一(按从小到大的顺序排列)