I'm looking for an algorithm that checks that for the given directed graph its nodes can be split into two groups such that nodes don't connect to each other within their group
For example
UPD
I need to check on Bipartite graphs, that's it
I'm looking for an algorithm that checks that for the given directed graph its nodes can be split into two groups such that nodes don't connect to each other within their group
For example
UPD
I need to check on Bipartite graphs, that's it
The graph you are describing is called a Bipartite Graph.
This is a way to check if a given graph is Bipartite or not.