This puzzle is an extension of this one: Minimize the longest King chain on a 5x5 binary board
Given a grid filled with numbers, we define a King chain to be a path on the grid such that:
- The path can be traversed with chess King's moves (moving to one of 8 adjacent cells at a time),
- The numbers on the path are all equal, and
- The path does not visit any cell more than once.
The length of a King chain is the number of cells visited by the King.
Can you find a 7x7 grid filled with zeros and ones, such that every pair of zeros and every pair of ones are connected via some King chain, and the longest King chain is as small as possible?