Sobes.tech
Junior — Senior

Merging two sorted arrays into a single sorted array

livecode

Task condition

There are two arrays X and Y, sorted in ascending order, with sizes m and n respectively. It is required to form a new array Z containing all elements of arrays X and Y, also sorted in ascending order.