Skip to content

Commit 8e6212d

Browse files
committed
binary search algorithm
1 parent efdab1b commit 8e6212d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

binary_search.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//Refer Link:
2+
// https://medium.com/@jeffrey.allen.lewis/javascript-algorithms-explained-binary-search-25064b896470
3+
14
let numbers = [1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59];
25

36
function binarySearch(numbers, target) {
@@ -22,4 +25,4 @@ function binarySearch(numbers, target) {
2225

2326
const target = 43;
2427
const index = binarySearch(numbers, target);
25-
// console.log(index);
28+
// console.log(index);

0 commit comments

Comments
 (0)