Radix sort implementation with counting sort algorithm