Eliminated swap counting, got bubble, selection, and insertion sort working

This commit is contained in:
2020-05-31 09:49:28 -05:00
parent c680ec7671
commit 4574231dcb
15 changed files with 1111303 additions and 75 deletions

View File

@@ -14,7 +14,7 @@ public class BubbleSorter extends Sorter{
usedSwap=false;
for(int i=0;i<numbers.length-1;i++){
if(compare(numbers[i],numbers[i+1])>0){
swap(numbers[i],numbers[i+1]);
swap(i,i+1);
usedSwap=true;
}
}