Counting Sort 2

  • + 0 comments

    python

    def countingSort(arr):
        res = []
        for i in range(max(arr) + 1):
            res += arr.count(i) * [i]
        return res