How does the helper work?
It uses regular expressions similar to those used for error checking (with parenthesis added around each interval). For each row and column it matches the standard regular expression against the current line. Then it matches the reverse of the regular expression against the reverse of the line. This gives two possible solutions – one is the solution with everything pushed as far to one end as possible, the other is the solution with everything pushed as far to the other end as possible. Any unknown cell that is part of the same interval in both solutions must be the color of that interval. This trick is fast, but does not find all cells known to be black or white in a line. Sometimes you can tell a cell must be one particular color, even if you don’t know which interval it is in. This test misses all such cases. For example, consider the partially solved row below: You and I would have no trouble figuring out that the center cell has to be white. But the two possible solutions to this