Pergunta de entrevista da empresa Microsoft

Some puzzles, I don't remember