BNY Interview Question

Round 1 was easy- got a moderate number problem, an array question and a standard dp problem