input: Write a function to find the longest common substring between two strings.
  assert longestCommonSubstring("abcdxyz", "xyzabcd") == "abcd"
  assert longestCommonSubstring("abcdef", "zabcf") == "abc"
  assert longestCommonSubstring("geeksforgeeks", "geeksquiz") == "geeks"
output: def longestCommonSubstring(s1, s2):
      m, n = len(s1), len(s2)
      result = 0
      end = 0
      length = [[0] * (n + 1) for _ in range(m + 1)]
  
      for i in range(1, m + 1):
          for j in range(1, n + 1):
              if s1[i - 1] == s2[j - 1]:
                  length[i][j] = length[i - 1][j - 1] + 1
                  if length[i][j] > result:
                      result = length[i][j]
                      end = i
  
      return s1[end - result:end]