Pergunta de entrevista da empresa Microsoft

find and write code with given problem