Question d’entretien chez Samsung Electronics

Print the loop nodes in a directed cyclic graph?