Sobes.tech
Junior — Senior

Merging two sorted arrays

livecode

Task condition

Given two arrays A and B, each sorted in ascending order and having lengths M and N respectively. It is necessary to merge them into one array, sorted according to the same rules, containing all elements of the original arrays.