Cognizant Interview Question

A puzzle was given to solve.