Search:

Type: Posts; User: copeg

Search: Search took 0.13 seconds.

  1. Replies
    5
    Views
    6,269

    Re: Fibonacci Spiral Help?

    Sorry, I meant to calculate the series over and over again in a loop. For example (using your fib example function)



    int n = 5;
    for ( int i = 0; i < n; i++ ){
    int fib = fib(i);
    }

    As...
  2. Replies
    5
    Views
    6,269

    Re: Fibonacci Spiral Help?

    I dislike big O notation, mainly because I stink at calculating it #-o...but do that in a loop it becomes something like O(n*n) (I know I know, we're talking a loop of five here though ;) )

    I'll...
  3. Replies
    5
    Views
    6,269

    Re: Fibonacci Spiral Help?

    Inspect the way the code determines the location of a Fibonacci square (eg the uses of modulus). My understanding is that the squares are repetitive in fours, and so checking the remainder from...
Results 1 to 3 of 3