131
правка
Изменения
→Модификации
swapped = true;
begin = -1 end = n - 2 Shakersort: '''while''' swapped count swapped =0''false'' begin++ '''for (int ''' i = 0; begin to end '''if''' A[i < n/2; ] > A[i+1] swap(A[i],A[i+1]) beg swapped = 0;''true'' end '''if''' swapped = false '''break''' swapped = n - 1;''false''
'''if''' A[i]>A[i+1]
swap (A[i],A[i+1]) swapped = '''true'''