Teach Time Encyclopedia - Learn About Our World
Home Page
Teach Time
Featured Topics

United States
by state

CITYology

Academic Disciplines

Historical Timelines

Themed Timelines

Calendars

Reference Tables

Biographies

How-tos



Saturday, October 11, 2008

Search algorithm

Search algorithms are algorithms that find one element of a set by some key (perhaps containing other information related to the key). As this is a common problem in computer science, the computational complexity of searching algorithms has been well studied.

The simplest search algorithm is linear search. It has O(n) running time, but can operate on a list containing the elements of the set.

A more sophisticated search algorithm is binary search. It runs in O(log(n)). This is significantly better than linear search for large lists of data, but it requires that the list be sorted before searching (see sort algorithm) and also be random access.

Interpolation search is better than binary search for large sorted lists. However, the underlying data structure must allow such kind of searching.

There is a family of tree search algorithms that compare ordered keys with one another to see if they are greater or less; the simplest one uses a binary search tree; and there is a family of tree data structures known as tries that don't require a key compare until the end of the search.

Hash tables are also used for search; they are the method of choice in most circumstances today.

There are also string search algorithms, which are related but different.

Grover's algorithm is a quantum algorithm that offers quadratic speedup over the classical linear search for unsorted lists.



Internet Hotel Solutions

Site Sponsors
AC Units
Baltimore Harbor
Boot Camp Grads
Bra Size
Burkittsville
College Hotels
Digital Harbor
Free Cell Phones
Golden Hare Travel
Golf Vacations
Golf Courses
Gourmet
Hair Styles
Hippodrome
iWoman
Lesson Plans
Maryland Hotels
MD Genealogy
Minor League Stuff
Motel Site
Ocean City
OC Real Estate
Old Agers
Office Supplies
Orlando
Pet Friendly Hotel
Room Prices
Savannah, GA
Ski Vacations
South Baltimore
Student Teaching
Travel Sources
University Hotels
Visit Military Bases
Washington, DC

Brought to you by NoChildLeftBehind.com and the Beaches and Towns Network, LLC.