binary-search-test-npm
v1.0.6
Published
This is the npm package used for binary search
Downloads
2
Maintainers
Keywords
Readme
Binary Search
This package provides a function to search the given element from array and return true/false accordingly.
Installation
npm i binary-search-test-npm
Usage
const { recurFun } = require('binary-search-test-npm');
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const x = 5;
const result = recurFun(arr, x, 0, arr.length - 1);
console.log(result); // Output: true