Linear Search Program
This program searches an array for an entry that matches a given key value.
-
Each element in table[] is visited.
-
The search is complete when an entry matching the given key value is found
or when all the entries in the array are checked without any match.
-
We use currentIdx to designate the element currently being visited.
Source Code of the LinearSearch Program
Source Code of the LinearSearch Program
(Graphical Version)
Back
Home