Re: [algogeeks] Re: deep vas shallow

2011-10-01 Thread megha agrawal
One function passes a pointer to the value of interest to another function. Both functions can access the value of interest, but the value of interest itself is not copied. This communication is called shallow. The alternative where a complete copy is made and sent is known as a deep copy. On

Re: [algogeeks] Give the logic for it

2011-10-01 Thread Manish Kumar
int median(int arr1[],int arr2[],int N) { if(N==2) { return ((max(arr1[0],arr1[1])+ min(arr2[0],arr2[1]))/2); } int mid=N/2; if(arr1[mid]==arr2[mid]) return arr1[mid]; if(arr1[mid]arr2[mid]) return median(arr1,arr2+N/2,N-N/2);

<    1   2