input: def merge_sort(A, B):
      """Implement a algorithm that sorts two large lists A and B. The algorithm should take the first element of list A and compare it with the first element of list B. If it is greater, then it should add the element to the result list and move the pointer of B to the next element. If the element of A is smaller, the pointer should move to the next element of A, and so on.
  
      Args:
      A (List[int]): The first list to be sorted.
      B (List[int]): The second list to be sorted.
  
      Returns:
      List[int]: The sorted result list containing all elements from A and B in ascending order.
  
      >>> A = [3, 6, 8, 10, 11]
      >>> B = [2, 5, 7, 12]
      >>> merge_sort(A, B)
      [2, 3, 5, 6, 7, 8, 10, 11, 12]
      """
      result = [] 
      i, j = 0, 0
  
      # Compare elements and add lower one to result
      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
  
      # Add remaining elements
      result += A[i:]
      result += B[j:]
  
      return result
output:     result = [] 
      i, j = 0, 0
  
      # Compare elements and add lower one to result
      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
  
      # Add remaining elements
      result += A[i:]
      result += B[j:]
  
      return result