


Input:
If the given adjacency matrix is:
[0 1 0]
[1 0 1]
[0 1 0] and 'm' = 3.

Output: YES
Explanation:
The given adjacency matrix tells us that 1 is connected to 2 and 2 is connected to 3. We can use three different colors and color all three nodes.
Hence we return true.
The first line contains two space-separated integers, 'v' and 'm', denoting the number of vertices in the undirected graph and the number of colors, respectively.
Each of the next 'v' lines contains 'v' integers denoting the adjacency matrix of the undirected graph.
You need to return “YES” if we can color the graph with at most M colors. Otherwise, return “NO”. (without the inverted commas)
You are not required to print the expected output. It has already been taken care of. Just implement the function.
Gray Code Transformation
Count of Subsequences with Given Sum
Distinct Integers After Zero Removal
Maximum Value Path in a Graph
Minimum Cost to Connect Network