How can I code this problem? (C++)
问题 I am writing a simple game which stores datasets in a 2D grid (like a chess board). Each cell in the grid may contain a single integer (0 means the cell is empty). If the cell contains a number > 0, it is said to be "filled". The set of "filled" cells on the grid is known as a "configuration". My problems is being able to "recognize" a particular configuration, regardless of where the configuration of cells are in the MxN grid. The problem (in my mind), breaks down into the following 2 sub