Answer:
count = 0
for x in range(len(array)):
if count == Len(array) -1:
break
max = max(array[:-1 - count])
count += 1
if array.index(max) == -1:
break
else:
hold = array[-1]
array[-1] = max
array[array.index(max)] = hold
Step-by-step explanation:
The python program is an implementation of a maxsort. The for loop iterates over the array, getting the maximum number for each reduced array and swaps it with the corresponding last items.