reverse(s); // reverse string S reverse(1,n-k); // reverse first n-k characters reverse(n-k+1,n) // reverse remaining Time complexity :O(n),space : O(1)
On 10 September 2011 21:53, praveen raj <praveen0...@gmail.com> wrote: > Whatever changes have been made in array in first step 1 will be continue > to 2nd step(reverse the n-k elements)........ > > With regards, > > Praveen Raj > DCE-IT 3rd yr > 9999735993 > praveen0...@gmail.com > > > > > On Sun, Sep 11, 2011 at 9:51 AM, bharatkumar bagana < > bagana.bharatku...@gmail.com> wrote: > >> @praveen: >> will u pls explain the second step ... i didn't understand .. >> >> On Sat, Sep 10, 2011 at 8:09 PM, praveen raj <praveen0...@gmail.com>wrote: >> >>> @amrit... +1 .. >>> >>> >>> With regards, >>> >>> Praveen Raj >>> DCE-IT 3rd yr >>> >>> -- >>> 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. >>> >> >> >> >> -- >> >> **Please do not print this e-mail until urgent requirement. Go Green!! >> Save Papers <=> Save Trees >> >> *BharatKumar Bagana* >> **http://www.google.com/profiles/bagana.bharatkumar<http://www.google.com/profiles/bagana.bharatkumar> >> * >> Mobile +91 8056127652* >> <bagana.bharatku...@gmail.com> >> >> >> -- >> 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. >> > > -- > 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. > -- With Regards, N.Vamshi Vijay, Mtech,CSE IIT Kharagpur Mobile:-07501541110 -- 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.