Linear Search Algorithm

SEARCHING

Searching is the process of finding or locating an element or number in a given list.

Examples

  1. Looking for meaning of a word in dictionary
  2. Looking for a telephone number by giving name
  3. 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.

linear search

Advantages:

  1. Easy algorithm to understand
  2. List may be in sorted or unsorted order

Disadvantages:

  1. Inefficient (SLOW)

linear search

Gopal Krishna

Hey Engineers, welcome to the award-winning blog,Engineers Tutor. I'm Gopal Krishna. a professional engineer & blogger from Andhra Pradesh, India. Notes and Video Materials for Engineering in Electronics, Communications and Computer Science subjects are added. "A blog to support Electronics, Electrical communication and computer students".

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »