Algorithm of Linear Search In Array
It is an operation in which a given array can be searched for a particular value. The location of the searched element is informed.
Example: An Array series[N] we will search an element value 'X' and if it is found then its location is stored in POS.
If there is duplicate values in the series[N] then position of last duplicate value will be printed. That means the searching will go from very first element to the very last element of the array.
2. While (C<=N)
Perform step 3 and 4
3. If (series[C]='X' then Pos=c
5. Display Pos