Anonymous user
Talk:Sorting algorithms/Radix sort: Difference between revisions
Talk:Sorting algorithms/Radix sort (view source)
Revision as of 13:25, 19 January 2011
, 13 years ago→Negatives: signed, thx remind
(How to solve) |
m (→Negatives: signed, thx remind) |
||
Line 1:
==Negatives==
Beware negative number handling! See [http://codepad.org/MLi6H7Y1 Wiki's python demo]. [[User:Dingowolf|dingowolf]] 13:25, 19 January 2011 (UTC)
: 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)
|