John Deere interview question

Dynamic programming question - Arrays and string problems.