Pergunta de entrevista da empresa Advicent Solutions

I was asked to write an algorithm to calculate the nth Fibonacci number.