I'm attempting to write a program that solves Sudoku puzzles using a variety of techniques. Up this point, I've only implemented naked singles and hidden singles (for rows and columns). I've been trying to implement the Skyscraper technique, but when solving by hand, I've been having trouble getting it to work particularly for this puzzle:
The program solves it up to this point:
When I attempt the following Skyscraper by hand, I eliminate the 9 for a naked 5, and thus fill it in...
But the completed puzzle is as follows...
Why is this? Is there some parameter of the Skyscraper technique that my structure isn't meeting? What about in the following case, where I create a Skyscraper structure under just about the same conditions as the first scenario, thus yielding a naked 7, which is the correct value for the green cell. How come the first Skyscraper didn't work?