You are viewing a single comment's thread. Return to all comments →
Python 3 solution:
def countingSort(arr): freq_arr = [0]*100 sorted_arr = [] for i in arr: freq_arr[i] += 1 for j,freq in enumerate(freq_arr): sorted_arr.extend([j]*freq) return sorted_arr
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 →
Python 3 solution: