[problem description] given two strings S and t (both composed of lowercase letters),

CSDN Q & A 2022-01-15 02:50:45

【 Problem description 】 Given two strings S and T( It's all made up of small letters ), lookup S Whether there is a string composed of a subsequence and T identical . It's important to note that , Subsequence and subarray are different , The sequence with the same order in the string can be called the same subsequence . for example : abcde Medium Subsequence bde Is a subsequence of a string .
【 Input form 】 If yes, the number of subsequences is returned , No return 0

【 Output form 】
【 The sample input 】abcdefg,cdf

【 Sample output 】1

【 The sample input 】abcbca,ca

【 Sample output 】2

【 The sample input 】abcdabd,abd

【 Sample output 】4


thank
Similar articles

2022-01-15

2022-01-15

2022-01-15