Question: Write a function in python a def merge_sorted(a, b) that merges two sorted lists, returning a new sorted list. For example, if a is 1,

Write a function in python a def merge_sorted(a, b) that merges two sorted lists, returning a new sorted list.

For example, if a is 1, 4, 9, 16 and b is 4, 7, 9, 9, 11 then the function will return a new list containing the values 1, 4, 4, 7, 9, 9, 9, 11, 16

You must not use the sorted() function nor the sort() method. Assume a and b are sorted in ascending order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!