Given a social network, divide people into two groups in which no one knows any other member in that group.
I: [[1,3], [0,2], [1,3], [0,2]]
O: true
I: [[1,2,3], [0,2], [0,1,3], [0,2]]
O: false
We can model the social network as an undirected graph. Then, we can use either DFS or BFS to determine the graph is bipartite or not.