mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
Increased spead of Cocktail Sort
This commit is contained in:
parent
89732a2103
commit
6bc8c294b2
@ -21,6 +21,7 @@ void cocktailSort(int arr[], int size)
|
||||
changed = TRUE;
|
||||
}
|
||||
}
|
||||
end--;
|
||||
|
||||
if (changed == FALSE)
|
||||
{
|
||||
@ -38,6 +39,7 @@ void cocktailSort(int arr[], int size)
|
||||
changed = TRUE;
|
||||
}
|
||||
}
|
||||
start++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user