Даны два отсортированных списка. Слейте их в один отсортированный список.
def merge_sorted_lists(list1: list[int], list2: list[int]) -> list[int]:
merge_sorted_lists([1, 2, 4], [1, 3, 4]) → [1, 1, 2, 3, 4, 4]
merge_sorted_lists([], [1, 3, 5]) → [1, 3, 5]
- 0 ≤ len(list1), len(list2) ≤ 50
- -100 ≤ val ≤ 100
- Оба списка отсортированы по неубыванию
list1 = [1,2,4]list2 = [1,3,4][1,1,2,3,4,4]list1 = []list2 = [1,3,5][1,3,5]list1 = [1,2,3]list2 = [][1,2,3]