Given an undirected graph with n nodes and edges, determine whether it is bipartite using a BFS two-coloring. Return true or false. The input is JSON {n, edges}.
Input: JSON {n, edges}.
Output: Boolean — true or false.
Input: {"n":4,"edges":[[0,1],[1,2],[2,3],[3,0]]}
Output: true
Explanation: An even cycle is bipartite.Input: {"n":3,"edges":[[0,1],[1,2],[2,0]]}
Output: false
Explanation: An odd cycle is not.Input: {"n":5,"edges":[[0,1],[2,3]]}
Output: true
Explanation: Disjoint edges are bipartite.1<=n<=10^5