BlackRock interview question

leet code dynamic programming and array