I need to know how to write a simple linear(insertion) sort that sort's an array of #'s into descending order while maintaining the link up of another array of numbers.
For example, a set of data for array ID will look like this:
ID[25]={ 4, 2, 1, 5, 3}
And a set of data for array SAT will look like this:
SAT[25]={ 780, 600, 1900, 690, 1200}
PS: ALL OF THESE NUMBERS ARE COMING FROM A DATA FILE
The thing is I am absolutely lost on making the other array sync with it like my example above.
I sort of understand your concept but I don't know how to write that out in code.
Am I supposed to write another insertion sort for the second array?
you swap ID[cand] and ID[pass]. You also can swap here content of the second array (with the same indexes).
If you are swapping contents of both arrays simultaneously it is equivalent that your arrays are linked.