Sorting Parallel Arrays?

Dec 10, 2008 at 9:17pm
I'm going over sorting arrays and am wondering how I would sort parallel arrays. I've got the algorithm for the bubble sort down. Is there any way to "copy" what happens in the bubble sort and have it do the same thing for another array? Thats the only idea I can think of to make it work.
Dec 10, 2008 at 9:20pm
When you're sorting, you're using two indices for comparison, the elements of which you will swap on certain circumstances. All you need to do is apply the swap on both arrays using the same indices.
Dec 10, 2008 at 9:50pm
Thanks, took a while to grasp but I got it ^_^
Topic archived. No new replies allowed.