Domanda di colloquio di BlackRock

2 questions about array manipulation and 1 dynamic programming question