Linear Search Algorithm
SEARCHING
Searching is the process of finding or locating an element or number in a given list.
Examples
- Looking for meaning of a word in dictionary
- Looking for a telephone number by giving name
- Looking for a name and address by giving telephone number
Other searching algorithms
- Exponential search
- Fibonacci search
- Interpolation search
LINEAR (SEQUENTIAL) SEARCH
A linear search of a list begins at the beginning of the list and continues until the item/element/number is found or the entire list has been searched.
Advantages:
- Easy algorithm to understand
- List may be in sorted or unsorted order
Disadvantages:
- Inefficient (SLOW)