Hi,
Thank you for providing these implementations!
According to the internet, radix sort should be a stable sorting algorithm. However looking at a testcase, the results seem to be not stable. A simple example program to validate this:
In the input sequence, the y value for x=0 is 0,10,20, etc (in that order). Thus, for a stable sorting implementation, the y value should stay in that order, i.e. the output of the program should be
Hi, Thank you for providing these implementations! According to the internet, radix sort should be a stable sorting algorithm. However looking at a testcase, the results seem to be not stable. A simple example program to validate this:
In the input sequence, the y value for x=0 is 0,10,20, etc (in that order). Thus, for a stable sorting implementation, the y value should stay in that order, i.e. the output of the program should be
But the actual programs output is
(I have omitted the rest of the output, it follows the same pattern).
I am not too comfortable with the actual code, so I can't propose a fix to this at this time.
Kind regards Christian