From: Giles Bowkett Date: 2006-11-07T14:08:11+09:00 Subject: Re: array sorting question wow, both these solutions look better than what I have, and I don't understand either one of them. so Phrogz your solution is very similar to mine, except you do the split after the sort instead of before it? I do have to preserve the nested arrays intact. I think I should say, this is a real-world thing, the arrays aren't really of numbers, they're of objects. I'm not sure if that makes a difference, though. hmm, bit too brain-fried to follow all this at the moment, but definitely thanks for the guidance, I'll see what I can learn from these. On 11/5/06, Phrogz wrote: > Giles Bowkett wrote: > > ok, cancel that, this is not the tower of hanoi, this is splitting an > > array in half, sorting both halves, and reversing one before putting > > it back together. doh!! > > As shown in my solution, I think the better answer is sorting the full > array by the length of the sub arrays, and then splitting it into two > arrays of every other item, and then (as you say) reversing one of them > before putting it back together. > > > -- Giles Bowkett http://www.gilesgoatboy.org