Keep two pointers - one at start of the array and other at end of the array Now current points to start of the array If current is negative , increment current If current is positive , swap it with the element at end and decrement current and end both If current >= end , then break.
Navin Kumar Gupta Final Year, B.Tech (Hons.) Computer Science & Engg. National Institute of Technology,Jamshedpur Mobile - 8285303045 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/j13jp_PBk44J. 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?hl=en.
