[algogeeks] Re: dearrangement

2006-10-11 Thread ridvansg
A1, A2, A3, An B1, B2, ... Bn The size of the array is 2n. An Ai stays on a position 2*i -1. An Bj stays on a position 2*j. The idea is to take a content of array's cell and put it in the place where it should stay, then you take the cell in which you put a content calculate its deserved

[algogeeks] Re: Copying Books from Sphere online judge.

2006-10-11 Thread Prunthaban Kanthakumar
Yep. It is Binary Search. Greedy will not work :-( My quick thuoght had dome flaws... :( On 10/11/06, Arunachalam [EMAIL PROTECTED] wrote: Can you please state your greedy solution? I have solved these kind of problems on the online judges using binary search. This problem is no exception to the