Uploaded by Good Ivan

Sheykernaya sortirovka skhema

advertisement
Начало
Ввод N
iLeft = 2
iRight = N
1
1
iLeft <= iRight
j = iLeft, iRight, 1
a(j) < a(j-1)
x = a(j)
a(j) = a(j-1)
a(j-1) = x
iRight = iRight - 1
j = iLeft, iRight, -1
a(j) < a(j-1)
x = a(j)
a(j) = a(j-1)
a(j-1) = x
iLeft = iLeft + 1
Конец
Download