139
правок
Изменения
м
→Слияние двух массивов
i = left, j = middle, k = 0;
array temp = new array[sizeof(a) + sizeof(b)];
while i <= middle and j <= right
temp[k++] = (a[j] < b[i]) ? a[j++] : b[i++];
while i <= middle
temp[k++] = b[i++];
while j <= right
temp[k++] = a[j++];
for (int t = 0; t != k; t++)