Amazon interview question

Longest Common Subsequence