@@ -0,0 +1,1118 @@
+def top_down_merge_sorted(sorted_array_1, sorted_array_2):%0A    merged_sorted_array = %5B%5D%0A    len1 = len(sorted_array_1)%0A    len2 = len(sorted_array_2)%0A    i, j = 0, 0%0A    # print(len1, len2)%0A%0A    for _ in range(len1 + len2):%0A        # print(%22i = %7B%7D, j = %7B%7D%22.format(i, j))%0A        # print(merged_sorted_array)%0A        if (i %3C len1) and (j %3C len2):%0A            # print('both')%0A            if sorted_array_1%5Bi%5D %3C= sorted_array_2%5Bj%5D:%0A                merged_sorted_array.append(sorted_array_1%5Bi%5D)%0A                i += 1%0A            else:%0A                merged_sorted_array.append(sorted_array_2%5Bj%5D)%0A                j += 1%0A        elif (i %3C len1) and (j %3E= len2):%0A            # print('j finished')%0A            merged_sorted_array.append(sorted_array_1%5Bi%5D)%0A            i += 1%0A        else:%0A            # print('i finished')%0A            # (i %3E= len2) and (j %3C len2)%0A            merged_sorted_array.append(sorted_array_2%5Bj%5D)%0A            j += 1%0A%0A    return merged_sorted_array%0A%0A%0Adef merge_sort(array, beg, end):%0A    pass%0A%0A%0Aif __name__ == '__main__':%0A    l1, l2 = %5B1, 3, 6, 7%5D, %5B2, 4, 5%5D%0A    print(top_down_merge_sorted(l1, l2))%0A

add top down method for sorted merging of sorted arrays