Testing graphs for bipartiteness

Graphs are amazing.

Bipartiteness is a characteristic of certain graphs. A graph is bipartite if and only if you can color each node one of two two colors in such a way that no two adjacent nodes have the same color. Well, that’s the realization of the actual definition, which can be found here. The two-color definition is also the foundation for the algorithm I wrote that tests whether or not a graph is bipartite.

My solution can be found here:

Published by

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: