Question d’entretien chez ByteDance

find cycle in a directed graph