Pregunta de entrevista de Surescripts

Dynamic programming question, string array parse question