Skip to content

Instantly share code, notes, and snippets.

@yanddam
yanddam / Recursive SelectionSort
Last active January 26, 2018 16:59 — forked from thien/Recursive SelectionSort
A recursive SelectionSort algorithm written in python
def selection(list, i, j, flag):
print("i=",i,"j=",j)
size = len(list)
if (i < size - 1):
if (flag):
j = i + 1;
if (j < size):
if (list[i] > list[j]):
list[i], list[j] = list[j], list[i]
selection(list, i, j + 1, 0);