Tech Mahindra interview question

How to solve a Fibonacci sequence?