Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f2d9537

Browse files
author
Kenny Chan
authored
Merge pull request #20 from DomIsAmazing27/master
fixed some variable names in 4.2
2 parents ed899ac + d20683d commit f2d9537

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@
345345
function recursiveBinarySearch(array, value, leftposition, rightposition) {
346346

347347
// Value DNE
348-
if (left > right) return -1;
348+
if (leftposition > rightposition) return -1;
349349

350350
var middle_pivot = Math.floor((leftposition + rightposition) / 2);
351351
if (array[middle_pivot] === value) {
352352
return middle_pivot;
353-
} else if (array[middle_pivot] > key) {
353+
} else if (array[middle_pivot] > value) {
354354
return recursiveBinarySearch(array, value, leftposition, middle_pivot - 1);
355355
} else {
356356
return recursiveBinarySearch(array, value, middle_pivot + 1, rightposition);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /