I am working on sorting strings of integers with a radix sort. I am confusing myself on the code logic however.
I have a file with integers, one to a line, and padded so 1 would be 001. I want to read those integers as strings so I can later do a sort on the ith digit in each string. For example, if I have 001, 003, 115. I have want to try something like this.
//radix part, i<3 to count the 3 numbers in each integer string for(i = 0; i<3; i++) call to counting sort
First, if each integer string is compose of 3 numbers and I will be counting by each one, does the string need to be a double array? Example...
Now the way to get counting sort to work is the problem. I have a working counting sort that I just need to modify but I do not have the logic of the loops down. Any ideas. I will post my code shortly.