120 std::array<std::array<int, V>, V>
graph = {
121 std::array<int, V>({0, 1, 1, 1}), std::array<int, V>({1, 0, 1, 0}),
122 std::array<int, V>({1, 1, 0, 1}), std::array<int, V>({1, 0, 1, 0})};
125 std::array<int, V> color{};
void graphColoring(const std::array< std::array< int, V >, V > &graph, int m, std::array< int, V > color, int v)
Recursive utility function to solve m coloring problem.
bool isSafe(int v, const std::array< std::array< int, V >, V > &graph, const std::array< int, V > &color, int c)
Utility function to check if the current color assignment is safe for vertex v.