You are viewing a single comment's thread. Return to all comments →
Easy to understand Python3 solution
def count(ar): out = [0] * 100 for i in ar: out[i] += 1 return out def printOrdered(arr): for i in range(0, 100): for j in range(0, arr[i]): print(i, end=' ') m = input() ar = [int(i) for i in input().strip().split()] printOrdered(count(ar))
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 2
You are viewing a single comment's thread. Return to all comments →
Easy to understand Python3 solution