Coloring

A graph is 2-colorable if it is possibly to label each vertex in the graph using one of 2 colors in such a way that every edge connects different colored vertices.

Using the adjacency list representation of a graph:

  • can the graph be 2-colored?
  • if so, how can you assign the colors?
Last modified September 7, 2023: Graph theory BFS (17f2895)