You are viewing a single comment's thread. Return to all comments →
I learnt about the Counter function in this page. I have been loving it since then.
from collections import Counter def countingSort(arr): response = {i: 0 for i in range(100)} response.update(Counter(arr).items()) return response.values()
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
Python 3
I learnt about the Counter function in this page. I have been loving it since then.