Maintain two pointers, and swap elements...
On Tue, Apr 12, 2011 at 4:42 PM, Akash Agrawal wrote:
> This is obvious solution what if u have contant space?
>
> Regards,
> Akash Agrawal
> http://tech-queries.blogspot.com/
>
>
> On Tue, Apr 12, 2011 at 3:48 PM, rajul jain wrote:
>
>> use merge sort
This is obvious solution what if u have contant space?
Regards,
Akash Agrawal
http://tech-queries.blogspot.com/
On Tue, Apr 12, 2011 at 3:48 PM, rajul jain wrote:
> use merge sort
>
> On Tue, Apr 12, 2011 at 3:07 PM, Akash Agrawal
> wrote:
>
>> Given an array with two subparts sorted. How wil
use merge sort
On Tue, Apr 12, 2011 at 3:07 PM, Akash Agrawal wrote:
> Given an array with two subparts sorted. How will you make a final sorted
> array.
>
> i/p: 1, 5, 7, 9, 11, 23, 2, 3, 8, 9, 21
>
> o/p:
> 1, 2, 3, 5, 7, 8, 9, 9, 11, 21, 23
>
>
> Regards,
> Akash Agrawal
> http://tech-queries
Given an array with two subparts sorted. How will you make a final sorted
array.
i/p: 1, 5, 7, 9, 11, 23, 2, 3, 8, 9, 21
o/p:
1, 2, 3, 5, 7, 8, 9, 9, 11, 21, 23
Regards,
Akash Agrawal
http://tech-queries.blogspot.com/
--
You received this message because you are subscribed to the Google Grou
can we use Bitonic Sort algorithm ?
-- Prashant Kulkarni
On Wed, Dec 15, 2010 at 12:52 PM, divya wrote:
> Given an array of size n wherein elements keep on increasing
> monotically upto a certain location
> after which they keep on decreasing monotically, then again keep on
> increasing, the
First determine the point from which array becomes decreasing. Then In-place
merge sort.
On 14 December 2010 23:22, divya wrote:
> Given an array of size n wherein elements keep on increasing
> monotically upto a certain location
> after which they keep on decreasing monotically, then again keep
Given an array of size n wherein elements keep on increasing
monotically upto a certain location
after which they keep on decreasing monotically, then again keep on
increasing, then decreasing
again and so on. Sort the array in place (ie. using only O(1) extra
memory).
--
You received this messag