File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Radix Sort in descending order help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Radix Sort in descending order help" Watch "Radix Sort in descending order help" New topic
Author

Radix Sort in descending order help

Langer Flanger
Greenhorn

Joined: Apr 07, 2007
Posts: 3
I am having difficulty converting this radix sort algorithm into descending order. Can anyone help me revise this code please?


[ added code tags for readability - Jim ]
[ April 09, 2007: Message edited by: Jim Yingst ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5


Why not start the value of index at the arr.length -1 and do index--

Bill
Langer Flanger
Greenhorn

Joined: Apr 07, 2007
Posts: 3
it almost worked, but it only sorts some numbers in descending order, leaving the rest all jumbled up
Langer Flanger
Greenhorn

Joined: Apr 07, 2007
Posts: 3
btw, anybody can still answer my question. I still don't have the answer. Thank you in advance.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Radix Sort in descending order help
 
Similar Threads
Sort the Array in reverse order
Printing a primitive array
Bubble sort
creating a list of subsets from N elements
need help on precedence of operators