static void Main(string[] args)
{
int[] _a = new int[4] { 3, 5, 6, 11 };
int[] _b = new int[8];
int _a_cnt = 0;
_a_cnt = 4;
_b[0] = 12;
_b[1] = 13;
_b[2] = 9;
_b[3] = 7;
mergeArray(_a, _b, _a_cnt);
}
static void mergeArray(int[] a, int[] b, int M)
{
Array.Copy(a, 0, b, M, M);
Array.Sort(b);
}
}
No comments:
Post a Comment