Closed labuladong closed 1 year ago
Q785. Is Graph Bipartite? 写了两个解法:DFS和Union Find DFS做了代码简化,color不再是boolean[]而是int[],使用1和-1记录两个颜色,0代表没有visit过,这样可以省去visited[] https://leetcode.com/problems/is-graph-bipartite/discuss/3850915/Java-Solution-DFS-and-Union-Find
Q886. Possible Bipartition https://leetcode.com/problems/possible-bipartition/discuss/3850972/Java-DFS-solution
784题 https://leetcode.cn/problems/is-graph-bipartite/description/ 886好怪,,换了个数据结构就不会了qwq,明天再看看
本期打卡已结算完成。报名最新一期的打卡活动 点这里