Skip to content

Commit 289df43

Browse files
committed
Change intuitively
1 parent 2421d79 commit 289df43

File tree

1 file changed

+3
-3
lines changed
  • algorithm/search/binary_search/recursive

1 file changed

+3
-3
lines changed

algorithm/search/binary_search/recursive/code.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ function BinarySearch(array, element, minIndex, maxIndex) { // array = sorted ar
88
var testElement = array[middleIndex];
99

1010
tracer._print('Searching at index: ' + middleIndex);
11-
tracer._selectSet([minIndex, maxIndex]);
11+
tracer._selectSet(minIndex, maxIndex);
1212
tracer._notify(middleIndex);
13-
tracer._deselectSet([minIndex, maxIndex]);
13+
tracer._deselectSet(minIndex, maxIndex);
1414

1515
if (testElement < element) {
1616
tracer._print('Going right.');
@@ -37,4 +37,4 @@ var element = D[Math.random() * D.length | 0];
3737
tracer._sleep(1000);
3838
tracer._pace(1000);
3939
tracer._print('Using binary search to find ' + element);
40-
BinarySearch(D, element, 0, D.length - 1);
40+
BinarySearch(D, element, 0, D.length - 1);

0 commit comments

Comments
 (0)