We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/chapter-1-fundamentals/1.1-programming-model/BinarySearch.js
The text was updated successfully, but these errors were encountered:
function BinarySearch(input, key) { return indexOf(input, key); function indexOf(a, k) { var start = 0; var end = a.length - 1; while(start <= end) { var mid = Math.floor((end - start) / 2) + start; if(k < a[mid]) { end = mid - 1; } else if(k > a[mid]) { start = mid + 1; } else { return mid; } } return -1; } }
Sorry, something went wrong.
小胡子哥习惯在函数声明最后面加个封号么?
@hanzichi 分号去掉了,不是习惯,可能是复制的时候多写了一个。
Merge pull request #1 from barretlee/master
d0530da
update from origin
No branches or pull requests
/chapter-1-fundamentals/1.1-programming-model/BinarySearch.js
The text was updated successfully, but these errors were encountered: