Homework 3 - Big-O

Due Monday April 14 1997


Reading: Astrachan: Chapter 2 Section 10 pages 60 to 69
Topp and Ford: pages 155-158

1. (Orders of Magnitude)
Fill in the following table:
nn3n2nlg(n)lg(n)
10    
100    
1000    
10000    
100000    
1000000    
where lg(n) is base 2.

2. (Big-O) Each of the functions shown below is to act on a dynamic set. For each function:

discuss Big-O of the number of comparisons (minimum, maximum, average) if:

a. The set is maintained as an unordered simply linked list:

b. The set is maintained as an ordered simply linked list:

c. The set is maintained as an ordered doubly linked list:


Last Updated: April 6, 1997 9:22 pm by

Harriet Fell
College of Computer Science, Northeastern University
360 Huntington Avenue #161CN,
Boston, MA 02115
Internet: fell@ccs.neu.edu
Phone: (617) 373-2198 / Fax: (617) 373-5121
The URL for this document is: http://www.ccs.neu.edu/home/fell/COM1101/HW/HW3/hw3.html