def selectionSort(array):
for i in range(len(array)):
min = i
for j in range(i, len(array)):
if array[j] < array[min]:
min = j
tmp = array[i]
array[i] = array[min]
array[min] = tmp
return array
'Algorithms and Data Structures > Coding Practices' 카테고리의 다른 글
AlgoExpert Three Number Sum (0) | 2022.07.19 |
---|---|
AlgoExpert Generate Document (0) | 2022.07.19 |
AlgoExpert Cipher Encryptor (0) | 2022.07.19 |
AlgoExpert Run-Length Encoding (0) | 2022.07.19 |
AlgoExpert First Non-Repeating Character (0) | 2022.07.17 |