Media.net interview question

Questions on Dynamic programming and Strings.