Loading topic
n and an adjacency list adj, where adj[u] holds the neighbours of vertex u. The bipartiteness tests in later chapters only work if that structure is built correctly. An edge stored in one direction only, or a ver7 min readtwo_colour function from it. You should also be comfortable with Big-O notation and with the adjacency list representation. The goal is to prove that BFS two-colouring runs in O(V + E) time and O(V) extra space. The chap7 min readfind and union with path compression. You should also be comfortable with XOR on bits.7 min read