Insertion Sort 🔥

Run Settings
LanguagePython
Language Version
Run Command
arr = list(map(int,input().split())) def InsertionSort(arr,n): for i in range(n): pos = i while pos>0 and arr[pos] < arr[pos-1]: arr[pos],arr[pos-1] = arr[pos-1],arr[pos] pos=pos-1 return arr print(InsertionSort(arr,len(arr)))
Editor Settings
Theme
Key bindings
Full width
Lines