Rumblefish interview question

Solve problem for algorytimh that find the longest path