[Solved] Quickest Algorithm to write for this?


I would start small, and build up. The smallest (n=1) is simply:
*
that clearly doesn’t work since there are 0 neighbors (and even number). So no solution exists for n=1. Next, try n=2. Only one choice:
**
This works.
Now what about n=3? Doesn’t work, no solution for n=3.
Now, how can you add to it to make n=4? n=6? Can you form a pattern?

1

solved Quickest Algorithm to write for this?