Question: write a program with C++ Part A Algorithmic question-reported interview question Given two sorted integer arrays arr1 and arr2, merge arr2 into arr1 as one
Part A Algorithmic question-reported interview question Given two sorted integer arrays arr1 and arr2, merge arr2 into arr1 as one sorted array. The number of elements initialized (with values other than zero) in arr1 and arr2 are ni and n2 respectively. You may assume that arr1 has enough space (size that is greater or equal to n1+ n2) to hold additional elements from arr2. Example: Input: arri - (11, 21, 31,0,0,0), n1 - 3 arr2 - [21,51,61) n2 = 3 Output (arri): [11, 21, 21, 31,51,61]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
