in this task you are requested to merge two sorted array into a sorted array in an ascending order the function merge array receives two sorted arrays and should return a sorted array of both arrays example arr1 - 1,1,3,5,7,9 arr2- 2,2,3,4,5,6
Answers
Answered by
0
Answer:
arr1 = [1,1,3,5,7,9]
arr2 = [2,2,3,4,5,6]
arr3 = arr1.extend(arr2)
arr3 = arr1
for i in range(0,len(arr3)):
for j in range(0,i+1):
if arr3[j]>arr3[j+1]:
arr3[j],arr3[j+1]=arr3[j+1],arr3[j]
print(arr3)
mark me as brainly
Similar questions