diff --git a/src/sorts/bubblesort.cpp b/src/sorts/bubblesort.cpp index 8d88c4b..4ad52c8 100644 --- a/src/sorts/bubblesort.cpp +++ b/src/sorts/bubblesort.cpp @@ -24,6 +24,6 @@ void BubbleSort::step() { void BubbleSort::_reset() { swapped = true; - n = data->size(); + n = data->size() - 1; } diff --git a/src/sorts/selectionsort.cpp b/src/sorts/selectionsort.cpp index 069a1fb..a035a45 100644 --- a/src/sorts/selectionsort.cpp +++ b/src/sorts/selectionsort.cpp @@ -1,7 +1,5 @@ #include "sorts.hpp" -#include - SelectionSort::SelectionSort(ArrayWrapper *ary) : Sort(ary) { ary->get_delay = [](int data_size) { return 1000000.0 / (data_size * data_size); }; }