Linear Search


Problems

Problem : Define the term linear search.


Problem : You need a picture frame, so you walk down to the local photo store to examine their collection. They have all of their frames lined up against the wall. Apply the linear search algorithm to this problem, and describe how you would find the frame you wanted.


Problem : Your local bookstore just received a new shipment of classic literature, and you're extremely excited to find the rare text you've been looking for. You decide that the best way to search for your book is a linear search algorithm. But when you get to the store, the clerk tells you that the books have yet to be sorted. Does this present a problem for your searching algorithm? Why or why not?


Problem : What do think may be a disadvantage to linear search? (ie. why should you even bother to continue on with this guide... isn't linear search good enough)?


Problem : When the city planners developed your neighborhood, they accidentally numbered the houses wrong. As such, the addresses of the houses on your street are in a random order. How does the postman find your house using a linear search method?


Take a Study Break

Green YOUR SCHOOL!

Click here to get involved with dosomething.org!

John Krasinski's BIG MIRACLE

Click to watch the trailer and read exclusive star interviews!

Do you like Anna?

Read Dear Albert... from ANNA's perspective!

BATTLESHIP, the movie

Here's why we're super jazzed about it.

Do energy juices actually work?

Our blogger puts 'em to the test!


The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps