LinkedIn interview question

A string-type problem and a dynamic programming problem.