AICS interview question

Longest cycle in a graph