An undirected graph G is called bipartite if its vertices can be partitioned into two sets X and Y such that every edge in G has one end vertex in X and one end vertex in Y. Describe an O(n+m) time algorithm for determining if a given graph G with n vertices and m edges is bipartite (without knowing the sets X and Y in advance)