@codinasion/binary-search
v1.0.2
Published
Typescript implementation of binary search
Downloads
1
Maintainers
Readme
@codinasion/binary-search
Typescript implementation of binary search.
Installation
# if you're using pnpm
pnpm add @codinasion/binary-search
# or, if you're using npm
npm install @codinasion/binary-search
# or, if you're using yarn
yarn add @codinasion/binary-search
Usage
import { BinarySearch } from "@codinasion/binary-search";
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const result = BinarySearch(arr, 5);
console.log(result); // 4