counting sort for list mod 10