Counting sort, AC