Question: Given two sorted arrays where the size of second array is large enough to hold the first array, write code to merge them (in sorted order). Write test cases

Solution: int[] MergeSortedArray(int firstArray[],int secondArrady[], int firstSize,int secondSize){
int k = firstSize + secondSize-1;
while(firstSize>=0 && secondSize>=0)
{
if(a[firstSize]>b[secondSize])
{
b[k--] = a[firstSize--];
}
else
{
b[k--] = b[secondSize--];
}
}
while(i>0)
{
b[k--] = a[firstSize--];
}
}
Test Cases: Arrays are empty etc.