You are viewing a single comment's thread. Return to all comments →
Alternately you can use enumerate to call the index
count = [0] * 100 for i in arr: count[i] += 1 sort = [] for i, n in enumerate(count): sort.extend([i] * n) return sort
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 →
Alternately you can use enumerate to call the index