teach-ict.com logo

THE education site for computer science and ICT

2. Data set and search criteria

To begin a search, you need to know two things: what you are looking for and where you are going to look.

We call the first item the search criteria, sometimes it is also called the target.

The second is the data set, and can be anything from a list in computer memory, to an open file from secondary storage, to a database.

 

search

Example

Let the data set be a list in memory consisting of (dog, cat, lion, penguin, ant)

and let the search criteria be 'cat'.

The task of the search algorithm is to determine if 'cat' is in the given data set.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: search algorithms