Skip to content

Commit d665ec2

Browse files
committed
fix mergeForceCollapse()
1 parent 52634dc commit d665ec2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

timsort.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,11 @@ class TimSort {
253253
while( runBase_.size() > 1 ) {
254254
diff_t n = runBase_.size() - 2;
255255

256-
if(n > 0 && runLen_[n - 1] <= runLen_[n + 1]) {
256+
if(n > 0 && runLen_[n - 1] < runLen_[n + 1]) {
257257
--n;
258258
}
259259
mergeAt(n);
260260
}
261-
262261
}
263262

264263
void mergeAt(diff_t const i) {

0 commit comments

Comments
 (0)