Goldman Sachs Interview Question

Write fib algorithm and optimize it