Pergunta de entrevista da empresa Infosys

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