Created
May 12, 2018 22:00
-
-
Save Unitoi01/b2940b33c8cd8d72cfdb0162e84aae99 to your computer and use it in GitHub Desktop.
SelectionSort
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def selectionSort(arr): | |
for i in range(len(arr)): | |
minId= i | |
for j in range(i+1, len(arr)): | |
if(arr[minId][0]>arr[j][0]): | |
minId=j | |
arr[i], arr[minId]= arr[minId], arr[i] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment