Check whether a given graph is Bipartite or not
Question
Quick Hints
- If a graph has odd cycle length it cannot be bipartite
Solution
Time complexity
- Same time complexity as BFS
O (n * n)
for adjancency matrixO (V + E)
for adjancency list
O (n * n)
for adjancency matrix O (V + E)
for adjancency list