Update linearSearch.js

This commit is contained in:
Mohit Sharma
2017-08-17 11:10:10 +05:30
committed by GitHub
parent d88c04f5ee
commit adbd6d7ca9

View File

@ -1,3 +1,9 @@
/*
* Linear search or sequential search is a method for finding a target
* value within a list. It sequentially checks each element of the list
* for the target value until a match is found or until all the elements
* have been searched.
*/
function SearchArray(searchNum, ar) {
var position = Search(ar, searchNum);
if (position != -1) {