Talk:Sorting algorithms/Radix sort: Difference between revisions

How to solve
m (signatures)
(How to solve)
Line 1:
==Negatives==
Beware negative number handling! See [http://codepad.org/MLi6H7Y1 Wiki's python demo].
<div><small>''(This was written by [[User:Dingowolf|Dingowolf]] ([[User_talk:Dingowolf|Talk]] | [[Special:Contributions/Dingowolf|contribs]]) at 13:03, 19 January 2011)''</small></div>
: An interesting problem; the easiest way to handle it seems to me to be to double the number of bins and put negative values in the first half and positive in the second. Or at least it produces correct results when I implemented it in the Tcl solution. (I suspect that the original algorithm simply didn't implement them, or sorted by printed digit instead of logical digit.) –[[User:Dkf|Donal Fellows]] 13:22, 19 January 2011 (UTC)
Anonymous user