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...
Type: Posts; User: copeg
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...
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...
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...