Graph_Coloring_Problem[1]
Graph_Coloring_Problem[1]
Code:
#include <stdio.h>
#include <stdbool.h>
return false;
return true;
if (v == V) {
return true;
color[v] = c;
return true;
color[v] = 0;
}
return false;
int color[V];
color[i] = 0;
return true;
return false;
void main()
int V, m;
scanf("%d", &V);
scanf("%d", &m);
int graph[MAX_VERTICES][MAX_VERTICES];
scanf("%d", &graph[i][j]);
if (!graphColoring(graph, m, V)) {
getch();
Output: