Check out example codes for "merge c++ stl". It will help you in understanding the concepts better.

Code Example 1

merge(arr1.begin(), arr1.end(), arr2.begin(), arr2.end(), arr3.begin());

Learn ReactJs, React Native from akashmittal.com