Re: bgt, sorting number array from least to gratest
Agreed with @12. Radix sort is a non-comparison algorithm, which is perfect for what you're trying to do. It's able to sort in O(N) time, where N is the number of characters in your string. You're dealing with small numbers, so this isn't particularly inefficient. You can't get any better than O(N * Log of N) for any sorting algorithm, so this is second-best.
Sorting algs can be fun to analyze. For your purposes, I'd take the Radix sort approach.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector