We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
definsertionSort1(n,arr):# Write your code herex=arr[-1]i=len(arr)-2whilex<arr[i]andi>=0:arr[i+1]=arr[i]print(*arr)i=i-1ifi!=len(arr)-2:arr[i+1]=xprint(*arr)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Insertion Sort - Part 1
You are viewing a single comment's thread. Return to all comments →
python3