I was task with a problem to write a test program to evaluate the computational complexity (Big O) of the following problem and really dont know where to start.
- A single loop iterated n times
- A nested loop where eaach loop is iterated n times
This is what I was able to produce
for(int i=0; i <n; i++){
// Do stuff
}
The problem now is how to write the test program. Can someone help me out?