https://www.kirupa.com/data_structures_algorithms/making_counting_sort_work_with_negative_values.htm
By default, counting sort does not work with negative values. It doesn't have to be that way, so let's look at why this is the case and how to fix it to work...
counting sortmakingworknegativevalues
https://www.hackerrank.com/challenges/countingsort1/problem
Count the number of times each value appears.
counting sorthackerrank