October 23rd, 2012, 01:09 AM

Appreciate the response Laserlight, I admit I did not have an strong understanding of what complexity is or how to find it, but when I said it performs 2^n I did mean that the inner function itself...

October 21st, 2012, 11:49 AM

You know what, I really dont care...I worked on this for a huge chunk of yesterday and it was only a tiny fraction of my assignment. Not only that I was trying to be nice saying I appreciate the...

October 21st, 2012, 11:30 AM

Appreciate the help but I figured it out just looking at the patterns of the code and determined the outer loop is O(N) and that the inner loop just performs 2^n like I said earlier, which in log...

October 20th, 2012, 06:02 PM

Sorry for wanting to give someone a nudge in the right direction...sometimes the fastest way to learn is to see how it should look. Did you learn how to code from scratch or did you look at other...

October 20th, 2012, 04:45 PM

October 20th, 2012, 04:40 PM

the while loop would get invoked n-1 times

October 20th, 2012, 04:10 PM

The complexity of the inner loop is O(2^n) then? Each time it multiplies count2 by 2 ...this stuff is driving me crazy I just cant wrap my head around it.

Then the complexity of the outer loop...

October 20th, 2012, 12:55 PM

Looks to me like the inner loop wont run for the first time through the segment because count2 is equal to count. After count is incremented once that inner loop will have to run one more time every...

October 20th, 2012, 10:57 AM

Ive been trying to figure out what the big-O notation is for this code segment:

for (int count =1; count < n; count++)

{

int count2 = 1;

while (count2 < count)

{

count2 =...