typescript-searching-methods

1.0.5 • Public • Published

##Overview

This project contains only two searching functions. They are

  1. linear Search :

It is a generic type function. This function will take two arguments, Array and value to search in that array. It returns an object which contains two properties position and comparisons.

  1. binary Search :

It is a generic type function. This function will take two arguments, Array and value to search in that array. It doesn't returns anything. It prints value position in the console itself.

##How to use it :

Run the command "npm i typescript-searching-methods" in the command prompt. It will be downloaded into node modules folder in your Project.

1)Now attach searching-functions.d.ts file path in the typescript file where you want to use these searching methods.

for example : /// or import * from "typescrtipt-searching-methods";

  1. Attach searching-functions.js file in your main html file.

for example:

<script src="../../typescrtipt-searching-methods/dist/lib/searching-functions.js"/></script>

/typescript-searching-methods/

    Package Sidebar

    Install

    npm i typescript-searching-methods

    Weekly Downloads

    0

    Version

    1.0.5

    License

    SEE LICENSE IN LICENSE

    Last publish

    Collaborators

    • narayanabojja