Jul-20-2017, 06:07 PM
(Jul-20-2017, 06:00 PM)nilamo Wrote: Sorting the odd numbers, and then inserting the evens at their original index, would probably be the easiest way, but my guess is that it'd also be the slowest, since you're effectively sorting the list twice.
What would be faster? It's not double sorting, it's sorting once and making one pass. Anything quicker would require keeping the evens in place while sorting once. That would require rewriting the sort algorithm, which I expect would be slower than the optimized sort method.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures