I have a minor problem to solve.
Due to a problem where my Dad works, he needs to figure out how to sort some numbers.
But they need to be sorted such that there is more than 2 between each number in the sequence.
eg. 2, 4, 6, 8 would become 4, 8, 2, 6.
The problem is in figuring out the 'best' sort algorithm to do this programatically.
Oh and ideally using every frequency.
(The background is that the numbers represent 'channel numbers' on a radio system, and they're separated by 50Mhz. If they're less than 2 apart, then there's interference)
There's probably a beer (or other drink of choice) in it for anyone who can give me a good solution.
Due to a problem where my Dad works, he needs to figure out how to sort some numbers.
But they need to be sorted such that there is more than 2 between each number in the sequence.
eg. 2, 4, 6, 8 would become 4, 8, 2, 6.
The problem is in figuring out the 'best' sort algorithm to do this programatically.
Oh and ideally using every frequency.
(The background is that the numbers represent 'channel numbers' on a radio system, and they're separated by 50Mhz. If they're less than 2 apart, then there's interference)
There's probably a beer (or other drink of choice) in it for anyone who can give me a good solution.