Mouthshut.com interview question

logic puzzles