Programming Examples
Algorithm for linear search
1. Read the employee ID to be searched.
2. Set i = 0.
3. Repeat step 4 until i = n or arr[i] = employee ID.
4. Increment i by 1.
5. If i = n:
Display "Not Found".
Else:
Display "Found".
Output