Thanks everyone for putting in ur efforts.. @lingerdave - the array is not sorted..
@ Dave - although the equations will ultimately solve the problem but I guess it will get tedious and may also go out of bounds in case of the 4th power equation.. As for the other method of placing the number at its index using a temp variable, that'll be great.. without requirement of extra space.. @Nikhil - Thanks for that method.. it saves space but as vijay pointed out it would alter the array.. I dnt know to wht extent that would be permitted but not a bad thought.. Its a good application of the same logic we use wen we tk an additional array.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.