Hi, i'm have problems whit find cicle in D. Subway problem. initially I thought that by implementing tarjan I could find the cycle (I tried it and I can't imagine it in an unmanaged graph), but maybe it would be easier to go through it with bfs and store the nodes that I am visiting in a set if they are not in the set . If it means that the nodes of the set are the cycle that I am looking for. Is this correct?. Is there a more efficient way and how can I implement it? Thank you




