Question: I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow

```
public class RecursiveFibonacci {

    public void calculateFib(long first, long next, long counter, int n) {
        if(counter == n) {
            return;
        }
        counter++;
        if(first == 0 && next == 0) {
            System.out.println("0");
            calculateFib(0, 1, counter, n);
            return;
        }

        if(first == 0 && next == 1) {
            System.out.println("1");
            calculateFib(1, 0, counter, n);
            return;
        }

        if(first == 1 && next == 0) {
            System.out.println("1");
            calculateFib(1, 1, counter, n);
            return;
        }

        long result = first + next;
        if(result > 1) {
            System.out.println(result);
                calculateFib(next, result, counter, n);
        }
    }

    public RecursiveFibonacci() {
        calculateFib(0, 0, 0, 9999999);
    }

    public static void main(String[] args) {
        new RecursiveFibonacci(); 
    }

}

```

Answer: 
Fibonacci sequences only depend on the previous two values, your base cases are `F(0) = 1` and `F(1) = 1`, and for general `F(n) = F(n - 1) + F(n - 2)`. All you need to do is remember these as you calculate. Recursion is a poor way to solve Fibonacci numbers as the higher the values the more calls you needlessly make. You'll soon run out of stack space.
One problem is, that `calculateFib()` does not return any calculation result. it only prints the result. So change the code such that it returns a result.  

Once that works, try also the non recursive variant, which is in practise better suited.