Challenge Information

Title : Merging Two Arrays
Difficulty : Hard
Solutions : 10
Maximum Score : 200
Completed by You: No
Description :

You are given two unsorted arrays of sizes x and y in ascending order. Merge them in sorted order without using any extra space. Modify both the arrays so that array 1 contains the first x elements and array 2 contains the last y elements.

Write a function solve that have the following parameter(s):
1.) arr 1 = array of integers
2.) arr 2 = array of integers

Example
Input:
x = 4, array 1 = [0,2,4,6]
y = 5, array 2 = [1,3,5,7,9]
Output:
The function will return,
array 1 = [0,1,2,3]
array 2 = [4,5,6,7,9]

Explanation
After merging two arrays we get
(0, 1, 2, 3, 4, 5, 6, 7, 9)

Constraints

Judocode