October 23rd, 2012, 02: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, 12:49 PM

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, 12:30 PM

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, 07: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, 05:45 PM

October 20th, 2012, 05:40 PM

the while loop would get invoked n-1 times

October 20th, 2012, 05: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, 01: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, 11: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 =...