Skip to content

Instantly share code, notes, and snippets.

Created Nov 29, 2020
What would you like to do?
a = [34, 56, 32, 89, 65, 54]
for i in range(len(a)):
index = i
for j in range(i+1, len(a)):
if a[index] > a[j]:
index = j
a[i], a[index] = a[index], a[i]
print("Sorted Array using Selection sort algorithm : ")
for i in range(len(a)):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment