Interview Query

Merge Sorted Lists

12
Have you seen this question before?

Given two sorted lists, write a function to merge them into one sorted list.

Bonus: What’s the time complexity?

Example:

Input:

list1 = [1,2,5]
list2 = [2,4,6]

Output:

def merge_list(list1,list2) -> [1,2,2,4,5,6]
Next question: Fill Rate Drop
.....
Python 3.9.6
Loading editor
Use Shift + Enter to run code