Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -1,5 +1,5 @@
|
|||
def selectionSort(lst):
|
||||
for i in range(0,len(lst)-1):
|
||||
def selection_sort(lst):
|
||||
for i, e in enumerate(lst):
|
||||
mn = min(range(i,len(lst)), key=lst.__getitem__)
|
||||
lst[i],lst[mn] = lst[mn],lst[i]
|
||||
lst[i], lst[mn] = lst[mn], e
|
||||
return lst
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue