Cisco interview question

Leetcode based dp and array easy question