On a machine that share is located:
Go to Run -> Start and enter services.msc and restart Server service
or go to Run -> Start and enter cmd, then execute two commands below
net stop LanmanServer
net start LanmanServer
Saturday, October 29, 2011
Thursday, October 20, 2011
Function Recurrence and Fibonacci Element
Let's say we want to calculate n-element value of Fibonacci sequence and we do not want to write to much code. The best solution is to use function recurrence. Here is the sample code:
int fib (int n)
{
if (n <= 1) return 1;
return fib (n-1) + fib (n-2);
}
Wouldn't it be nice to see how computer will proceed through stack to return the correct number?
I did it for you. We are starting at green box calculating value of 5th element. Have fun!
Function flow |
Subscribe to:
Posts (Atom)