Searching Algorithms

One of the more important tasks performed by computers is the location and retrieval of data. For data held in arrays there are a number of possibilities, and one of these is a simple technique referred to as linear search. A second approach, known as binary search, will be discussed later.

These examples assume that there is no duplication of data within the data set, but the techniques can be extended to cover data sets that do contain duplicates.

The item being searched for is referred to as the target.

Next: Linear Search