the algorithm you can use is:
* Create another temporary array,
* create a loop, within a another loop
* check if the index of arr1[1] exists in arr2[n]
* if not, copy arr1[1], into arr2[n+1].
* end loop
*finally, delete arr1, and copy contents of temp array arr2, backinto arr1.