Nagarro Interview Question

Maths should b strong.