Pregunta de entrevista de BlackRock

2 questions about array manipulation and 1 dynamic programming question