fixed coctailShaker
This commit is contained in:
parent
a786ad15e5
commit
9021517448
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ impl Algorithm{
|
|||
}
|
||||
swapped = false;
|
||||
upperBound = upperBound-1;
|
||||
for i in ((lowerBound)..(upperBound-1)).rev() {
|
||||
for i in ((lowerBound)..(upperBound)).rev() {
|
||||
if list.lessThan(i+1, i) {
|
||||
if list.swap(i+1, i).await {return};
|
||||
swapped = true;
|
||||
|
|
Loading…
Reference in a new issue