add running quicksort
This commit is contained in:
parent
2665332f70
commit
26f76c8a5c
@ -53,7 +53,7 @@ private:
|
|||||||
auto pivot = *std::next(data.begin(), std::distance(data.begin(), data.end()) / 2);
|
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) {
|
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) {
|
auto m2 = std::partition(m1, data.end(), [pivot, this](const auto &em) {
|
||||||
|
Loading…
Reference in New Issue
Block a user