Domanda di colloquio di Schneider Electric

Longest Common Subsequence, DP question