Given an undirected graph and a number m, determine if the graph can be colored with at most m colors such that no two adjacent vertices share the same color. Return one valid coloring if it exists.
- An adjacency matrix
graphof sizeV x V. - An integer
m(number of colors).
Input: graph = [[0,1,1,1],[1,0,1,0],[1,1,0,1],[1,0,1,0]], m = 3
Output: [1, 2, 3, 2]