consider following example...
suppose initailly we have   a1a2a3b1b2b3c1c2c3

then do the following->
 a1a2a3 b1b2b3 c1c2c3   (look for b1 in the remaining array and swap with
a2  ,  so in this case   swap(a2,b1)   )
 a1b1a3 a2b2b3 c1c2c3   (similarly swap(a3,c1) )
 a1b1c1 a2b2b3 a3c2c3    swap(b3,c2)
 a1b1c1 a2b2c2 a3b2c3


this in inplace

(plz correct if im wrong)

-- 
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 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to