Mitsogo interview question

To solve a logical question