Merging of Arrays
Merging two arrays means combining two separate arrays into one single array. For instance, if the first array consists of 3 elements and the second array consists of 5 elements then the resulting array consists of 8 elements. This resulting array is known as a merged array.
Algorithm
- Input the two array sizes and their elements.
- Declare another array with size equal to the sum of both sorted arrays.
- Copy the elements of first array into final array.
- Copy the elements of second array into the final array.
- Print the third array.