mergesort(A[],B[])
{
   i=0,j=0;
   while i<=l1 && j<=l2
   {
   	  if A[i]<B[j] then C.push(A[i]);i++;
		           else C.push(B[j]);j++; 
   }	
   if (i<l1) while(i<=l1) C.push(A[i++]);
   if (j<l2) while(j<=l2) C.push(B[j++]);
}