Is Graph Bipartite? (LC #785) checks if nodes can be split into two groups with no edges within groups. Use graph coloring with colors. BFS or DFS from each unvisited node. Color it , color all neighbors , color their neighbors , and so on. If you try to color a node that's already the opposite color, return false. This runs in time and space. The problem is equivalent to checking if the graph has no odd-length cycles. Meta tests this for understanding graph properties.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/graphs/is-graph-bipartite
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████████████████████████████████████████████████████████████████████