The Fibonacci Sequence in C# using recursion and iteration returning BigInteger values.
All Unit Tests can be found under the Fibonacci.Tests namesapce.
One Interface exists:
public interface IFibonacci
{
BigInteger Get(int n);
List<BigInteger> GetSequence(int length);
}
There are two concrete implementations of this Interface.
var fibonacci = new FibonacciIterative();
BigInteger result = fibonacci.Get(5);
List<BigInteger> sequence = fibonacci.GetSequence(3);
var fibonacci = new FibonacciRecursive();
BigInteger result = fibonacci.Get(5);
List<BigInteger> sequence = fibonacci.GetSequence(3);
Available on: