Laura holds a Master's in Experimental Neuroscience and a Bachelor's in Biology from Imperial College London. Her areas of expertise include health, medicine, psychology, and neuroscience. Laura holds ...
# longest_increasing_subsequence[prev] + array[i] if the length is longer.
Explanation: We can pick characters from s1 as a subsequence from indices [0, 3, 4], [0, 3, 12], [0, 11, 12] and [8, 11, 12]. So total 4 subsequences of s1 that are equal to s2.