Problem Description
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note: You have to modify the array A to contain the merge of A and B. Do not output anything in your code.
TIP: C users, please malloc the result into a new array and return the result.
If the number of elements initialized in A and B is m and n respectively, the resulting size of array A after your code is executed should be m + n
Problem Constraints
1 <= |A|, |B| <= 105
Input Format
The first argument is an integer array A.
The second argument is an integer array B.
Output Format
Update the array A.
Example Input
A : [1 5 8]
B : [6 9]
Example Output
Modified A : [1 5 6 8 9]
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified.
Still have a question? Checkout Sample Codes for more details.