Well, i am using the quicksort, the code is modified by me, and the code does:

i have 2 arrays, one of doubles and other of integers, the doubles have the result of division of two numbers and the array with the ints have numbers that will refer to another array, but it is not important for this problem.

An example:

doubles array: (12,44;12,44;7,22; 12,44)

ints array: ( 4 , 2 , 3 , 1 )

now using my quicksort function i will organize the array of doubles from the higher to the lower, and the ints array will follow the order of the doubles array, the result is :

doubles array: (12,44;12,44;12,44; 7,22)

ints array: ( 4 , 2 , 1 , 1 )

Well, when i have values in the doubles array that are equal, i need to check the ints array and order the ints values, but only the ints that in the doubles array are equals, the final result will be:

doubles array: (12,44;12,44;12,44; 7,22)

ints array: ( 1 , 2 , 4 , 1 )

How i can order the ints array only between an interval that is given by the interval of numbers that are equals in the doubles array?

Thanks