A company may compare text from different sources to identify shared ordered content patterns. Given two strings, return one longest common subsequence, preserving character order while allowing characters to be skipped.
A subsequence does not need to be contiguous. If multiple longest common subsequences exist, return any one of them.
Implement longest_common_subsequence(text1, text2).
text1 and text2 containing lowercase English letters.text1 and text2.def longest_common_subsequence(text1, text2):