I'm trying to implement a radix sort on a 32 bit signed integer key in Java. Hence I thought that a radix sort would work well.
I am however having issues with how to implement the sort, in terms of how to deal with the fact that negative numbers are going to end up in the wrong place if just implemented naively.
Any help with this would be appreciated.