Infosys Interview Question

Questions on pseudo code and they asked to get solve me one