Professional Documents
Culture Documents
Assignment 2
The exercise numbers below are from the edition of the book available in the bookstore. If you use a
different edition, make sure the exercises match.
1. Do the following exercises from section 3.2: 2, 8, 13, 24.
2. Do the following exercises from section 3.3: 7, 8.
3. Give a big O estimate for the running time of the following code. Argue your answer.
void f ( int N ){
for ( int i =0; i < N ; i ++)
for ( int j =0; j < i * i ; j ++)
if ( j % i == 0)
for ( int k =0; k < j ; j ++)
a ++;
}
Due Date
The assignment is due next Tuesday (September 30).