Tech Mahindra Interview Question

How to solve a Fibonacci sequence?