ByteDance interview question

find cycle in a directed graph