Can union find/union rank be used to find cycles in directed graphs as well? If not, is there any other approach to it apart from BFS/DFS?
Can union-find algorithm be solved using the adjacency list representation for an undirected graph instead of edge representation for a graph? Or is it required to first convert adjacency list to edge list using BFS/DFS(is there any other algo to convert among various representations of graphs)?