diff --git a/sel_sort.py b/sel_sort.py index d82254d..78d34f8 100644 --- a/sel_sort.py +++ b/sel_sort.py @@ -9,20 +9,7 @@ def minOfList(lst, start, end): ''' 'approach: updating min_element using comparision in recursion and returning its index after traversing completely' - ''' - if i == 0: - i = start - j = start - - if i == (end+1): - return j - else: - if lst[i] < lst[j]: - min_element = lst[i] - j = i - i = i+1 - return minOfList(lst,start, end, i, j) - ''' + if start == end: return end elif lst[end] > lst[start]: