Longest Common Subsequence LCS 2 - Get Subsequence
Problem Given two sequences, return the longest subsequence present in both of them. Examples Example 1: Input: text1 = "abcde", text2 = "ace" Output: "ace" Explanation: The longest common subsequence is "ace". Example 2: Input: text1 = "abc", text2 = "abc" Output: "abc" Explanation: The longest common subsequence is "abc". ...