Implemented countingSort()