Traversing the complement graph in linear/near-linear time in multiple ways
A bunch of DFS and BFS ways to traverse a complement graph efficiently, including linear-time BFS and a DSU-style trick for the DFS case.
A bunch of DFS and BFS ways to traverse a complement graph efficiently, including linear-time BFS and a DSU-style trick for the DFS case.