An introduction to lockless algorithms
An introduction to lockless algorithms
Posted Feb 21, 2021 12:29 UTC (Sun) by Wol (subscriber, #4433)In reply to: An introduction to lockless algorithms by pebolle
Parent article: An introduction to lockless algorithms
int fibonacci( int f)
{
if (f <= 1)
return f;
else
return fibonacci( f-1) + fibonacci( f-2);
}
{
if (f <= 1)
return f;
else
return fibonacci( f-1) + fibonacci( f-2);
}
Which will blow your stack for large values of f :-)
I hope I've got it right ... :-)
Cheers,
Wol
