Logic+in+Algorithms

Look again at the logic algorithm. When did you get the 'Aha!' moment?