def lcs(s1, s2, i, j):
    """
    The length of longest common subsequence among the two given strings s1 and s2
    """
    if i == 0 or j == 0:
        return 0
    elif s1[i - 1] == s2[j - 1]:
        return 1 + lcs(s1, s2, i - 1, j - 1)
    else:
        return max(lcs(s1, s2, i - 1, j), lcs(s1, s2, i, j - 1))
The length of longest common subsequence among the two given strings s1 and s2