Introduction - If you have any usage issues, please Google them yourself
Please design algorithm, using up to 4 different colors for coloring on the puzzle (each block of color coated), asked the color of adjacent regions with each other, print out all possible scenarios. Tip: You can put the jigsaw puzzle on each region as a vertex, if the two regions adjacent to, the corresponding vertices connected with an edge, so the puzzle is converted to graph, the problem is essentially a graph search problem.