Re: [algogeeks] Inplace Array Convertion

2011-10-14 Thread Siddhartha Banerjee
if integers are positive,then go  on a cycle... like a[2]goes to its final
position, the  element in a[2]'s final position goes to its final position,
and so on... each time  on visiting an element, put some marker on it...
like make it negative... finally after an element comes to position of a[2],
search the array from a[2] onwards to see if any element is unmarked... if
there is one, then go on a cycle from that element onwards and proceed...
till you visit all element of array... finally change the sign of all
elements to positive (remove the markers...)

-- 
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.



[algogeeks] Inplace Array Convertion

2011-10-13 Thread shiva@Algo
Convert an array a1 a2 a3...an b1 b2 b3...bn c1 c2 c3...cn to a1b1c1
a2b2c2...anbncn, inplace

-- 
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.