Pregunta de entrevista de John Deere

Dynamic programming question - Arrays and string problems.