Infosys interview question

Longest Common Subsequence based question