input: Write a python function to merge two sorted lists into one sorted list.
  assert merge([1, 3, 5, 8], [2, 4, 6, 7]) == [1, 2, 3, 4, 5, 6, 7, 8]
  assert merge([10, 20, 30], [5, 15, 25, 35]) == [5, 10, 15, 20, 25, 30, 35]
  assert merge([1, 1, 1], [1, 1, 1]) == [1, 1, 1, 1, 1, 1]
output: def merge(list1, list2):
      merged_list = []
      i, j = 0, 0
      while i < list1.size() and j < list2.size():
          if list1[i] <= list2[j]:
              merged_list.append(list1[i])
              i += 1
          else:
              merged_list.append(list2[j])
              j += 1
      merged_list.extend(list1[i:])
      merged_list.extend(list2[j:])
      return merged_list