1.0.1 • Published 3 years ago

search-ray v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

search-ray

search-ray is javascript library to search for item in array and it will return index of the found element.

Installation

Use the package manager npm to install search-ray.

npm install search-ray

Usage

Program for linear search

const search = require('search-ray');

console.log(search.linearSearch([1,2,3,5],5))   // [3]

Program for binary search

const search = require('search-ray');

console.log(search.binarySearch([1,2,3,5],5))   // 3

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Sponsor this project

Support via PayPal