Let's you have a graph with n nodes and m bi-directional edges. (n, m <= 1e5).↵
How would I get the cycles in this graph in an efficient way using DFS.↵
↵
BTW, I've linked an image where I drew what I thought is a cycle. If it's not a cycle, please tell me what a cycle actually is.↵
↵
/predownloaded/d3/9f/d39ffb7a821d52f55930893ee7667e980def82ad.png
How would I get the cycles in this graph in an efficient way using DFS.↵
↵
BTW, I've linked an image where I drew what I thought is a cycle. If it's not a cycle, please tell me what a cycle actually is.↵
↵
/predownloaded/d3/9f/d39ffb7a821d52f55930893ee7667e980def82ad.png