Lucid Software interview question

Dynamic programming : longest string chain