hackerrank: counting sort