Pergunta de entrevista da empresa Fujitsu

that was a puzzle in the technical interview round