You are viewing a single comment's thread. Return to all comments →
python
import itertools def countSort(arr): # Write your code here result = [[] for i in range(len(arr))] for i in range(len(arr)): if i < len(arr)//2: result[int(arr[i][0])].append("-") else: result[int(arr[i][0])].append(arr[i][1]) result = list(itertools.chain.from_iterable(result)) print(" ".join(result))
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 →
python