CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: quixomatic

Search: Search took 0.02 seconds.

  1. Replies
    15
    Views
    16,416

    Re: [RESOLVED] Big-Oh Notation Question

    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...
  2. Replies
    15
    Views
    16,416

    Re: Big-Oh Notation Question

    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...
  3. Replies
    15
    Views
    16,416

    Re: Big-Oh Notation Question

    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...
  4. Replies
    6
    Views
    2,603

    Re: I need help please.

    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...
  5. Replies
    15
    Views
    16,416

    Re: Big-Oh Notation Question

    Just once per while loop
  6. Replies
    15
    Views
    16,416

    Re: Big-Oh Notation Question

    the while loop would get invoked n-1 times
  7. Replies
    15
    Views
    16,416

    Re: Big-Oh Notation Question

    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...
  8. Replies
    15
    Views
    16,416

    Re: Big-Oh Notation Question

    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...
  9. Replies
    15
    Views
    16,416

    [RESOLVED] Big-Oh Notation Question

    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 =...
Results 1 to 9 of 10





Click Here to Expand Forum to Full Width

Featured