binarysearchtejas
v1.0.1
Published
this is package for binary search
Downloads
25
Readme
binarysearchtejas
Description
binarysearchtejas
is a simple and efficient binary search algorithm implementation in JavaScript. This package allows you to quickly search for an element in a sorted array.
Installation
You can install the package using npm: npm install binarysearchtejas
Usage
First, require the binarysearchtejas
module in your project:
const binarySearch = require('binarysearchtejas');
API
binarySearch(arr, target)
arr
: A sorted array of elements to search.target
: The element to search for in the array.
Returns the index of the target element if found, otherwise returns -1
.
Repository
For more information, visit the GitHub repository.
Issues
If you encounter any issues or have any questions, please open an issue on GitHub.
License
This project is licensed under the ISC License.