third task for counting sort