Possible Duplicate:
Regarding in-place merge in an array
Stumbled upon this interview question. Given an array of size n where first n/2 is sorted and the second half is sorted. Sort the entire array in place. Now what I can think of in place is somewhat like insertion sort, that'll have space complexity as O(1), but time complexity will be more than O(n). Is an O(n) in place solution possible for this problem?