input: def merge_sort(A: List[int], B: List[int]) -> List[int]:
      """
      Merge two sorted lists A and B into a single sorted list by comparing elements from the start.
      The algorithm compares the first element of A with the first element of B. If A's element is smaller,
      it is added to the result list and the pointer in A is moved to the next element. If B's element is smaller,
      the same operation is done on B. This process continues until all elements from both lists have been added to the result list.
      Test cases:
      >>> merge_sort([3, 6, 8, 10, 11], [2, 5, 7, 12])
      [2, 3, 5, 6, 7, 8, 10, 11, 12]
      >>> merge_sort([1, 3, 5], [2, 4, 6])
      [1, 2, 3, 4, 5, 6]
      """
      result = []
      i, j = 0, 0
  
      while i < len(A) and j < len(B):
          if A[i] < B[j]:
              result.append(A[i])
              i += 1
          else:
              result.append(B[j])
              j += 1
  
      result += A[i:]
      result += B[j:]
  
      return result
output:     
      result = []
      i, j = 0, 0
  
      while i < len(A) and j < len(B):
          if A[i] < B[j]:
              result.append(A[i])
              i += 1
          else:
              result.append(B[j])
              j += 1
  
      result += A[i:]
      result += B[j:]
  
      return result
  