CS210 Lab: Libraries and Running Time Measurement Prelab


Refresher:

Big O notation is used for characterizing how an algorithm (or piece of code) acts for different problem sizes.

Prelab Questions:

The following questions are designed to get you thinking more about big O. For each of the following code fragments, specify the big O expressions:
  1. int a;
    a=b;

  2.  
  3. for (int i=0; i<n; i++)
          array[i]=0;

  4.  
  5. for (int i=0; i<n; i++)
          for (int j=0; j<n; j++)
                a++;

For Answers, click here
Back to Libraries and Running Time Measurements Lab click here

CS Dept Home Page
CS Dept Class Files
CS210 Class Files

Copyright: Department of Computer Science, University of Regina.