How to check that given graph is Bipartite or not?