COSC 2306: Data Programming - Selecting Maximum Strategy
def selection_sort(a_list):
for fill_slot in range(len(a_list)-1, 0, -1):
pos_of_max = 0
for location in range(1, fill_slot + 1):
if a_list[location] > a_list[pos_of_max]:
pos_of_max = location
temp = a_list[fill_slot]
a_list[fill_slot] = a_list[pos_of_max]
a_list[pos_of_max] = temp