Refactor counting sort and add radix sort