Steve Luke wrote:
You are swapping the inner and outer value un-conditionally. So you are effectively shuffling the numbers but are not sorting them. I assume you want to only swap the values if the condition is met. I am also not convinced you are comparing the correct values (inner with minimum then resetting minimum). I think you can drop the use of minimum all together...
Umm, okay the "><" was a copy paste botch, this is illegal in
java, try it. it should only be : "<" since compareTo() returns less than 0 if the Strings are not equal. this code is adapted from Robert LaFore. so if you have another algorithm that works with Strings i'd be more than glad to use it ... i already had to edit the previous post so hopefully this will go through okay.