Thnxs for the oportunity to learn, is fantastic…
i do the exercise perfect, i understand the logic of the algorithm, i implemented a function working good, passes al tests, but not the 6. i tried many ways. i looked into webs woth explanation, i asked IA, i got it correct, but cant pass de test, and i cannot get the exercise finished. i m here, for more of 2 houres behind this exercise.
def selection_sort(array: list):
largo = len(array)
for i in range(largo):
min_idx = i
for j in range(i + 1, largo):
if array[j] < array[min_idx]:
min_idx = j
array[i], array[min_idx] = array[min_idx], array[i]
return array
cant see the problem.