Skip to content

Commit

Permalink
Merge pull request #12 from tomy8910/patch-1
Browse files Browse the repository at this point in the history
Change maxIndex to minIndex
  • Loading branch information
Bogdan-Lyashenko authored Nov 15, 2017
2 parents 9e19a2c + 7763c14 commit e3dafab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const code = `function indexSearch(list, element) {
maxIndex = list.length - 1;
while (minIndex <= maxIndex) {
currentIndex = Math.floor(maxIndex + maxIndex) / 2;
currentIndex = Math.floor(minIndex + maxIndex) / 2;
currentElement = list[currentIndex];
if (currentElement === element) {
Expand Down

0 comments on commit e3dafab

Please sign in to comment.