# sorting algorithm --> Selection sort
# selection sort works by taking the minium element out of the given array and putting it on first
# then leaving that element we look for another minimum element and put it on second and hence forth process continues
arr =[4,6,8,2,7,0,5] # 7
array_length = len(arr)
for j in range(array_length):
min = arr[j]
for i in range(j,array_length):
if min > arr[i]:
min = arr[i]
index = i
arr[j], arr[index] = min, arr[j]
print(arr)