(int[] color)
| 7 | |
| 8 | /* A utility function to print solution */ |
| 9 | static void printSolution(int[] color) |
| 10 | { |
| 11 | System.out.println( |
| 12 | "Solution Exists:" |
| 13 | + " Following are the assigned colors "); |
| 14 | for (int i = 0; i < V; i++) |
| 15 | System.out.print(" " + color[i]); |
| 16 | System.out.println(); |
| 17 | } |
| 18 | |
| 19 | // check if the colored |
| 20 | // graph is safe or not |