so what was the optimal solution found in the previous discussion?? give a link
I don't remember the name of the thread...so only i posted this.

On 8/15/10, Gene <[email protected]> wrote:
> In fact this solution was suggested (without code) in the original
> discussion.
>
> It's O(n^2).
>
> You're only re-ordering a constant number (4) of elements in each
> recursive pass, and each pass requires O(n) time to execute.  You also
> need to assume your compiler will remove the tail recursion.
> Otherwise it will also require O(n) space, which misses the whole
> point of the problem.
>
> On Aug 15, 12:29 pm, Debajyoti Sarma <[email protected]>
> wrote:
>> Array of 2n length is given {a1,a2,a3,...,an,b1,b2,b3,...,bn}
>> we have to make the array like as {a1,b1,a2,b2,a3,b3,...,an,bn}
>> without using extra buffer space.
>> here a solution i came up withhttp://codepad.org/ub5Ie4sI
>> I know this was discussed before .
>> But i want to know the time complexity of the code i have given(i m
>> confused)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to