Algorithms

Representing the Information

A possible representation is two indexed lists, one of names, the other of phone numbers:

 Name          Telephone Number
   N1                     T1
   N2                     T2
   N3                     T3
     :                         :
     :                         :
   N10,000           T10,000

Implicitly, telephone number Ti belongs to the person with the name Ni. There is no order imposed on the list of names.

We do not need, for example, the page and column structure of the telephone book. A linear structure is what we need to solve the problem.

Sequential Search

Click on START to set up the problem, and then click on STEP to cycle through the successive steps of the search algorithm.

What is the value corresponding to in the following list?:










[Prev][TOC][Next]


CS1104 Main Page
Last Updated 2001/09/11
© L.Heath, 2000, seriously updated by J.A.N. Lee, 2001.