I've had trouble articulating a simple way to break this question down in to a question title, and therefore a google search.
I'm wondering if there is a sorting algorithm already defined that can sort an array of numbers without keeping pairs adjacent. Easier to explain with an example:
Values:
1,3,5,2,1,3,2,4
A normal numerical sort would come out as:
1,1,2,2,3,3,4,5
What I would like:
1,2,3,4,5,1,2,3
I could hack this together, I just want to know if there is a name for this kind of sort.