You are viewing a single comment's thread. Return to all comments →
Python3:
def countSort(arr): for i in range((len(arr)//2)): arr[i][1] = '-' strings = {} for x, y in arr: x = int(x) strings.setdefault(x, '') strings[x] += ' ' + y print(' '.join(strings[x].strip() for x in sorted(strings)))
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 →
Python3: