Hi,
      for example consider this array
a1,a2,a3,b1,b2,b3.
 
Now you start with a2 which is not in its place. Mark the second place as empty move a2 to its position. Before moving make a copy of a3 in memory. Now put a2 there.
 
So the array will look like
a1,_,a2,b1,b2,b3. Now do the same thing for a3 which is in memory. Continue with this solution unless the destination is empty. If it is empty rescan the array to find an element which is not in its place. Continue the process.
 
regards
Arunachalam.

 
On 7/6/06, Siva <[EMAIL PROTECTED]> wrote:

hi arunachalam

i belv u got the question correct...but could u elaborate ur soln...

it s too handwavy..i still dont know how it can be done in place...

thanks
siva





--
===================================
want to know more about me
http"//ww.livejournal.com/users/arunachalam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to