Visa Inc. interview question

First question was to write code for Fibonacci Numbers, this was I guess just to test if I can write some code or not. The second question was detecting a cycle in undirected graph