Pregunta de entrevista de Cisco

Leetcode based dp and array easy question