You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def counting(arr): frequency = [0 for i in range(100)] for num in arr: frequency[num] += 1 return frequency def countingSort(arr): frequency = counting(arr) sortedarr = [] for i in range(len(frequency)): for j in range(frequency[i]): sortedarr.append(str(i)) return sortedarr
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 →
Here is my Python solution!