Nagarro Interview Question

logical reasoning