I really don't understand writing a program to solve this problem. Granted I play chess casually but I had a solution before I even finished reading the problem.
I think it's an interesting puzzle, but I don't think that makes it a good interview question.