linear-search-index
v1.0.1
Published
Search an array linearly, Return index of array for found item or null
Downloads
8
Maintainers
Readme
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