I just joined this website :) I am a beginner and I had a problem. I have two arrays a [n] and b[n]. for example :
n = 3
3 10
6 5
2 30
The first column is array a and the second is array b. I sort array b but I need array a [i] to be for array b[i] after sorting . what can I do ? I mean : b = 30, 10, 5 (after sorting) now a[0] = 3 and b [0] = 30 but I want it to be like this : a[0] = 2 b[0] = 30 I hope you could understand it Thanks In advance :)
I need array a to be relevant to array b please help me