Increased spead of Cocktail Sort

This commit is contained in:
Hiyabye 2020-04-18 20:33:31 +09:00
parent 89732a2103
commit 6bc8c294b2

View File

@ -21,6 +21,7 @@ void cocktailSort(int arr[], int size)
changed = TRUE; changed = TRUE;
} }
} }
end--;
if (changed == FALSE) if (changed == FALSE)
{ {
@ -38,6 +39,7 @@ void cocktailSort(int arr[], int size)
changed = TRUE; changed = TRUE;
} }
} }
start++;
} }
} }