go to previous page   go to home page   go to next page

Answer:

Yes.


Linear Search

01234567
Boston Albany Detroit Phoenix Peoria Albany Houston Hartford

When you answered the question, you probably looked over the items one at a time until you found "Peoria". This is roughly the algorithm known as linear search.

Here is a description of linear search:

Look over the array of Strings. Apply the algorithm. Is "Peoria" in the array? Is "Albany" in the array? Is "Mystic" in the array?


QUESTION 15:

Now consider these questions: