问一个算法题 is Graph Bipartite


采用新的方法做,如果原来的connected components 是 c, constructed后的graph connected是2 * c, 那么graph is bipartite。 那么怎么证明(不会), 算法怎么写, 我的想法是用union find算出前后两个graph的connected counts。欢迎讨论。。