@superiqbal7/binarysearch

1.0.0 • Public • Published

Binary Search.

Installation

npm install @superiqbal7/binarysearch --save

Synopsis

Given a sorted array arr[] of n elements, search a given element x in arr[].:

const binarySearch = require("@superiqbal7/binarysearch");

binarySearch([1, 2, 3, 4], 4); // Prints '4'
binarySearch([1, 2, 3, 4], 5); // Prints '-1'

License

MIT

Package Sidebar

Install

npm i @superiqbal7/binarysearch

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.55 kB

Total Files

3

Last publish

Collaborators

  • superiqbal7