1024 BBS
问一个算法题 is Graph Bipartite
Job Hunting
CS News
dawei3ing
(jiaowodawei12)
4 May 2021 18:38
1
Screen Shot 2021-05-04 at 1.09.54 PM
686×859 115 KB
采用新的方法做,如果原来的connected components 是 c, constructed后的graph connected是2 * c, 那么graph is bipartite。 那么怎么证明(不会), 算法怎么写, 我的想法是用union find算出前后两个graph的connected counts。欢迎讨论。。