input: Write a function to find the longest common subsequence between two strings. The function should take two strings as input and return the length of the longest common subsequence. Implement the function using dynamic programming where the solution is built bottom-up.
  def lcs(X, Y):
      m = len(X)
      n = len(Y)
      L = [[None]*(n+1) for i in range(m+1)]
      for i in range(m+1):
          for j in range(n+1):
              if i == 0 or j == 0:
                  L[i][j] = 0
              elif X[i-1] == Y[j-1]:
                  L[i][j] = L[i-1][j-1]+1
              else:
                  L[i][j] = max(L[i-1][j] , L[i][j-1])
      return L[m][n]
  
  assert lcs("ABACEDF", "ABDCF") == 4
  assert lcs("XYZ", "XYZ") == 3
  assert lcs("ABC", "") == 0
  assert lcs("", "") == 0
  assert lcs("XMJYAUZ", "MZJAWXU") == 4
output: def lcs(X, Y):
      m = len(X)
      n = len(Y)
      L = [[None]*(n+1) for i in range(m+1)]
      for i in range(m+1):
          for j in range(n+1):
              if i == 0 or j == 0:
                  L[i][j] = 0
              elif X[i-1] == Y[j-1]:
                  L[i][j] = L[i-1][j-1]+1
              else:
                  L[i][j] = max(L[i-1][j] , L[i][j-1])
      return L[m][n]