[Community Puzzle] Mosaic

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Syneil,validated by @cedricdd,@Rafarafa and @Timinator.
If you have any issues, feel free to ping them.

Nice puzzle! I started with this expecting that I would not be able to finish it (I expected to run into cases where I would need to implement Algorithm X or system of linear equations or whatever), but it was a pleasant surprise that such complexities were not needed here.

which method u use to solve this puzzle ?

The cases are made so that - at each step of the solve - it is always possible to resolve at least one more cell of the grid. Knowing this, you can loop until the grid is filled and find the next resolvable cell.

Tip to get you started

The first cells to solve are any ‘0’ cell. Or any ‘9’, ‘6’, ‘4’ cell for center, border, corner cells respectively.

Tip to keep on solving

If a ‘6’ cell has 3 empty neighbors, 1 filled neighbor, and 5 unknown neighbors, you know that every remaining unknown neighbors will be filled.

Good luck!

yhuberla gives a nice answer. My ‘method’ is not even explicitly starting with some knowns, but just letting my code loop until everything is found, and during each loop check per number cell whether there is already enough information to fill either a # or a . in a solution grid.