Let's create a program that represents the map of voivodeships in Poland as a graph, and color such areas so that two voivodeships with common borders do not have the same color. Of course, you should limit the number of colors.
To start, let's think about the graph representation. Here, nodes represent particular voivodeships, while edges represent common borders between voivodeships.
The map of Poland with the graph already colored is shown in the following diagram:
Your task is just to color nodes in the graph using the already-described algorithm. To do so, you create the undirected and unweighted graph, add nodes ...