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.
I need an explanation why would this fail some test cases?
defcountSort(arr):size=len(arr)mid=(size-1)//2# Replace first halfforkinrange(mid+1):arr[k][1]='-'# Sort based on x[0]sort=sorted(arr,key=lambdax:x[0])#Printresultsforsinsort:print(s[1],end=' ')
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
I need an explanation why would this fail some test cases?