binary-search-package-219new
v1.0.6
Published
Create an npm Package for Binary Search: A simple package to perform binary search on sorted arrays.
Downloads
277
Readme
Binary Search Package
A simple and lightweight npm package for performing binary search on sorted arrays in JavaScript.
Features
- Efficiently search for elements in a sorted array.
- Easy to use and integrate.
- Lightweight and fast.
Installation
Install the package using npm:
npm i binary-search-package-219new
Usage
Import the package and use the binarySearch function:
const binarySearch = require('binary-search-package-219new');
// Example usage
const sortedArray = [1, 3, 5, 7, 9];
const target = 7;
const index = binarySearch(sortedArray, target);
console.log(index); // Output: 3
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Praveen Email: [email protected] GitHub: Praveen