4. Longest Common Subsequence (LCS)