WISE App interview question

R1: Simple logic based question...