You can try this out :---

If  the range of the number are in between -N to +N eg: -10^6 to
+10^6 , then take the the Absolute( Lower bound.) i:e N (10^6) .

For each number add it in the Index [i+N] ..

While printing the value of Number at Index X, Print the value in the
Index [X-N]..


Example:--

List of 6 elements :-   8 4 -3 -10 12 -100   Take N=100

1st  Element  will go to Index-> [8+100]
2nd Element will go to Index-> [4+100]
3rd  Element will go to Index-> [-3+100]=[97]

etc....


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