Infosys interview question

first one was Longest Common Subsequence.