in reply to Exceptional sorting
Your "new" sort order is not unique, or I don't understand the criteria used to sort. I think I can find two possible orders for your example:
1245 0000 1246 1247 1248 1245 1246 1247 1248 0000
Why is the second order not allowed? Is it because the 0000 was to the left of the 1246 ? If such is the case, I would make the elements so that they order "properly" by encoding them differently:
Depending on your actual needs (for example, times wrapping around the day border), it might be more convenient to first convert all your "numbers" into seconds since the 1. January 1970, and then sort the times.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Exceptional sorting
by pelagic (Priest) on May 25, 2004 at 10:37 UTC | |
by PerlingTheUK (Hermit) on May 25, 2004 at 10:43 UTC |