vector*

On Mon, Aug 6, 2012 at 1:02 AM, adarsh kumar <algog...@gmail.com> wrote:

>
> Can you care to explain as to how exactly the elements are stored? Is it a
> vactor of strings??
>
> On Mon, Aug 6, 2012 at 12:32 AM, Navin Kumar <algorithm.i...@gmail.com>wrote:
>
>> Actually i wanted to do it inplace. Using extra space it is much  easier
>> problem.
>>
>>
>> On Mon, Aug 6, 2012 at 12:27 AM, payal gupta <gpt.pa...@gmail.com> wrote:
>>
>>> int merge(int arr[],int n)
>>> {
>>> int l=0;
>>> int j=(n/3);
>>> int k=2*(n/3);
>>> int *a=(int*)malloc(sizeof(int)*n);
>>> for(int i=0;i<n/3;i++)
>>> {
>>> a[l++]=arr[i];
>>> a[l++]=arr[j++];
>>> a[l++]=arr[k++];
>>> }
>>> for(int i=0;i<n;i++)
>>> arr[i]=a[i];
>>> free(a);
>>> }
>>> cud be dun be dun recursively also to minimize d space complexity...
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Aug 4, 2012 at 8:20 AM, Navin Kumar <algorithm.i...@gmail.com>wrote:
>>>
>>>> In given array of elements like 
>>>> [a1,a2,a3,..an,b1,b2,b3,..bn,c**1,c2,c3,...cn]
>>>> .Write an efficient program to merge them like
>>>> [a1,b1,c1,a2,b2,c2,...an,bn,cn**].
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msg/algogeeks/-/gVCyxQV1IhAJ.
>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to