Determines whether the graph G is a k-regular graph.
G
A k-regular graph is a graph where each vertex has degree k.
Whether the given graph is k-regular.