Search Algorithm

Why Trust Techopedia

What Does Search Algorithm Mean?

A search algorithm is the step-by-step procedure used to locate specific data among a collection of data. It is considered a fundamental procedure in computing. In computer science, when searching for data, the difference between a fast application and a slower one often lies in the use of the proper search algorithm.

Advertisements

Techopedia Explains Search Algorithm

All search algorithms make use of a search key in order to proceed with the procedure. Search algorithms are expected to return a success or a failure status, usually denoted by Boolean true/false. Different search algorithms are available, and the performance and efficiency of the same depend on the data and on the manner in which they are used.

A linear search algorithm is considered the most basic of all search algorithms. The best perhaps is binary search. There are other search algorithms such as the depth-first search algorithm, breadth-first algorithm, etc. The efficiency of a search algorithm is measured by the number of times a comparison of the search key is done in the worst case. The notation used in search algorithms is O(n), where n is the number of comparisons done. It gives the idea of the asymptotic upper bound of execution time required for the algorithm with respect to a given condition.

Search cases in search algorithms can be categorized as best case, average case and worst case. In some algorithms, all the three cases might be asymptotically the same, whereas in some others there could be a large difference. The average behavior of the search algorithm helps in determining the usefulness of the algorithm.

Advertisements

Related Terms

Margaret Rouse
Technology Expert
Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.