add running quicksort

This commit is contained in:
Robin Dietzel 2023-12-05 22:39:03 +01:00
parent 2665332f70
commit 26f76c8a5c

View File

@ -53,7 +53,7 @@ private:
auto pivot = *std::next(data.begin(), std::distance(data.begin(), data.end()) / 2);
auto m1 = std::partition(data.begin(), data.end(), [pivot, this](const auto &em) {
return this->cmp(em, pivot);
return this->cmp(pivot, em);
});
auto m2 = std::partition(m1, data.end(), [pivot, this](const auto &em) {