Given an undirected graph represented as an adjacency list, determine if it is bipartite. The input is a D array graph where graph[i] contains all neighbors of node i. Nodes are labeled to . Return true if you can partition the nodes into two groups such that every edge connects nodes in different groups. Return false otherwise. Before reading on, think: how will you track which color each node has?
What value represents "not yet colored"?