hr counting sort 3