Re: [algogeeks] In Place Merging of Two Sorted .Array...Not Easy as seems to be,....

2011-02-25 Thread ankit sambyal
Hey, it can be done in o(n*logn) time by calling maxheapify function on the two arrays. Then it decreases the size of the array whose last element is maximum of the two arrays. I hope you are aware of heap data structure and you have got the idea how to do it. If not let me know, it will explain

[algogeeks] In Place Merging of Two Sorted .Array...Not Easy as seems to be,....

2011-02-24 Thread bittu
we have two sorted array a[]={2,6,9,60}; b[]={1,3,5,34,80}; merge the array in such way.. a[]={1,2,3,5}; b[]={6,9,34,60,80}; ..no extra space is allowed..i.e. In-Place merging Many of you thinks its easy..but here is q. of minimum complexity i have done this but min e complexity high that not