Pergunta de entrevista da empresa BlackRock

solve two coding question with a basic editor