Microsoft interview question

Given a connected graph, create a function that returns true if the graph is bipartite.