linear-search-index

1.0.1 • Public • Published

linear-search-index

Search an array linearly in O(n) time complexity. Return index of array for found item or null.

example:

const linearSearch = require('linear-search-index');

linearSearch([5, 2, 4, 6, 1, 3],4)
  //returns 3

Package Sidebar

Install

npm i linear-search-index

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mcasey8540