Infosys interview question

finding longest common subsequence between two substring