Wipro interview question

logical reasoning