binrehangk
v1.0.0
Published
Performs binary search on a sorted array.
Downloads
2
Readme
Performs binary search on a sorted array.
- @param {number[]} arr - The sorted array to search.
- @param {number} target - The value to search for.
- @returns {number} The index of the target value if found, otherwise -1.