Amazon interview question

The coding question were about substrings and dynamic programming