Searching properties worksheet

In this worksheet you will analyze the various kinds of searching algorithms and determine what their properties are.


Name __________________________________

================================================
Part 1
------------------------------------------------
Sequential search of an Array

type of search:

cost in time:

cost in space:

amortized cost:


-----------------------------
Sequential search of a list


type of search:

cost in time:

cost in space:

amortized cost:


-----------------------------
Binary search of an array


type of search:

cost in time:

cost in space:

amortized cost:


-----------------------------
Search of a Binary Search tree


type of search:

cost in time:

cost in space:

amortized cost:

===========================================================
Part 2.

Consider the following problem, than choose a mechanism
to implement it. Discuss in about 100 words why your
choice is a good one.

A compiler creates a symbol table for every name in a
program. Entries in the table are created when the name is
first encountered. Information in the table includes things
like source location (file name, line and column), type
information, size information etc. As the compiler
translates the program this information is looked up.
Looking up information, and inserting new entries in the
table are interleaved. In about 100 words explain what
techniques you would use, and explain why it would be a
good one.
















What to turn in.

Get a copy of this worksheet (by right-clicking and the downloading) and fill in the missing properties for each of the searches and writing the short 100 word essay.

Back to the Daily Record.

Back to the class web-page.