Sage interview question

Logical Puzzles