Skip to content

Commit

Permalink
Fix bubblesort
Browse files Browse the repository at this point in the history
  • Loading branch information
vypxl committed Jan 30, 2022
1 parent 16a5ee1 commit 233b3cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/sorts/bubblesort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ void BubbleSort::step() {

void BubbleSort::_reset() {
swapped = true;
n = data->size();
n = data->size() - 1;
}

2 changes: 0 additions & 2 deletions src/sorts/selectionsort.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "sorts.hpp"

#include <iostream>

SelectionSort::SelectionSort(ArrayWrapper *ary) : Sort(ary) {
ary->get_delay = [](int data_size) { return 1000000.0 / (data_size * data_size); };
}
Expand Down

0 comments on commit 233b3cb

Please sign in to comment.