Infosys Interview Question

was given puzzle to solve