Pergunta de entrevista da empresa mscripts

1-2 puzzles and 1 coding question