We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4f12421 + a08034c commit bd4a7d6Copy full SHA for bd4a7d6
library/src/scala/util/Sorting.scala
@@ -66,8 +66,8 @@ object Sorting {
66
else
67
if (ord.compare(a(i0), a(iK)) < 0) i0
68
69
- if (ord.compare(a(iN - 1), a(iK)) <= 0) iN - 1
70
- else iK
+ if (ord.compare(a(iN - 1), a(iK)) <= 0) iK
+ else iN - 1
71
val pivot = a(pL)
72
// pL is the start of the pivot block; move it into the middle if needed
73
if (pL != iK) { a(pL) = a(iK); a(iK) = pivot; pL = iK }
0 commit comments