give string text1 text2 return length long common subsequence if common subsequence return 0A subsequence stre new string generate original string character delete change relative order remain charactersFor example ace subsequence abcdeA common subsequence string subsequence common string Example 1input text1 abcde text2 ace output 3 Explanation the long common subsequence ace length 3example 2input text1 abc text2 abcoutput 3explanation the long common subsequence abc length 3example 3input text1 abc text2 defOutput 0explanation there common subsequence result 0 constraints1 text1length text2length 1000text1 text2 consist lowercase english character