TriKri
April 6th, 2008, 06:19 PM
Hello!
I would like to find a good sorting algorithm for sorting data that already is almost sorted. That means, an elemend is at a possition in the array that usually isn't very far from where it is going to end up, so say you are sorting like 1,000,000 numbers, and all of the numbers has an index that differs at the most 10 from the index it is going to get when it has been sorted... Is there some fast sorting algorithm for doing this?
I would like to find a good sorting algorithm for sorting data that already is almost sorted. That means, an elemend is at a possition in the array that usually isn't very far from where it is going to end up, so say you are sorting like 1,000,000 numbers, and all of the numbers has an index that differs at the most 10 from the index it is going to get when it has been sorted... Is there some fast sorting algorithm for doing this?