LeetCode
Is Graph Bipartite?
Click
here
for an explanation.