I'm using this code to sort an Array
Array.Sort(numsFoundedCount, numsFoundedSorted);
Which it works but when 2 items of numsFoundedSorted have the same numsFoundedCount value i want them (the numsFoundedSorted items) to be sorted from min to max.
int[] numsFoundedCount = new int[80];
int[] numsFoundedSorted = new int[80];
numsFoundedSorted inludes an integer and numsFoundedCount represent how many times this integer has appear. so i want to sort numsFoundedSorted from minumum to maximum according to numsFoundedCount.
I want both of the arrays to be sorted like in Array.Sort For example:
numsFoundedSorted {5,7,6,8}
numsFoundedCount {3,2,2,1}
After sort must be:
numsFoundedSorted {8,6,7,5}
numsFoundedCount {1,2,2,3}
numsFoundedCountandnumsFoundedSorted?