Pregunta de entrevista de BlackRock

Some probability questions and need to solve some coding problems.