Closed andyg24 closed 3 years ago
Hi,
Since you've tried to make this algorithm general, in BubbleSort2, the line
if (y < x) std::swap(x, y);
should be
if (comp(y, x)) std::swap(x, y);
Thanks.
Thanks for the spot! fixed in https://github.com/gerben-s/quicksort-blog-post/commit/06f629814e469be974ee1827754ff49eb0f1fba0
Hi,
Since you've tried to make this algorithm general, in BubbleSort2, the line
if (y < x) std::swap(x, y);
should be
if (comp(y, x)) std::swap(x, y);
Thanks.