If the array is set that way specifically, you have the advantage on knowing that b1 will always be at position n/2 + 1. So you could do something like this:
idx1 = a1 (position 0) idx2 = b1 (position n/2 + 1) while idx1 < (n/2 + 1) copy idx1 to new array copy idx2 to new array increment idx1 & idx2 If you can't create that new array to copy to, you will need to do it in-place which gets trickier... --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---