Skip to content

Commit 68d5fbb

Browse files
committed
fix logger text
should output i instead of j
1 parent 1db8388 commit 68d5fbb

File tree

1 file changed

+2
-2
lines changed
  • algorithm/sorting/merge/bottom_up

1 file changed

+2
-2
lines changed

algorithm/sorting/merge/bottom_up/code.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function merge(mergeFrom, start, middle, end, mergeTo) {
4444
/**/if (j < end) {
4545
/**/ logger._print('writing smaller value to output');
4646
/**/} else {
47-
/**/ logger._print('copying index ' + j + ' to output');
47+
/**/ logger._print('copying index ' + i + ' to output');
4848
/**/}
4949
/**/tracer._notify(mergeTo, k, D[mergeFrom][i])._wait();
5050
/**/tracer._denotify(mergeTo, k);
@@ -82,4 +82,4 @@ function copy(mergeFrom, mergeTo, start, end) {
8282
}
8383

8484
mergeSort(0, D[0].length);
85-
logger._print('sorted array = [' + D[0].join(', ') + ']');
85+
logger._print('sorted array = [' + D[0].join(', ') + ']');

0 commit comments

Comments
 (0)