@shady..

Look out for in-place merge sort...

On Jan 11, 4:23 pm, shady <sinv...@gmail.com> wrote:
> any idea on how to merge two sorted arrays of size m and size n in O(m+n)
> time and without extra space ?
>
>
>
>
>
>
>
> On Wed, Jan 11, 2012 at 3:22 PM, Dipit Grover <dipitgro...@gmail.com> wrote:
> > @ all k-way people : I dont get it how the complexity would be O(m*n) . I
> > just went through the algo and I feel that one would need to find the
> > minimum element among the head-elements of all individual row-arrays, for
> > all the resulting m*n elements. I say so since we may not necessarily have
> > a sorted column-array(array formed by taking the head elements of each
> > row-array) each time we look for the min element. Please correct me if I am
> > wrong.
>
> > @Lucifer- yeah we need to only traverse the columns till the current
> > column.
>
> > --
> > 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