@Sukran: This wont work for the test case like this for example the word is "Nitan": then the word ur algorithm will create is "Nitanatin" hence the number of additions =4
but ideal case i would be "nitatin" : where number of additions is only 2. On Sun, Sep 4, 2011 at 11:11 PM, sukran dhawan <sukrandha...@gmail.com>wrote: > > > On Sun, Sep 4, 2011 at 11:11 PM, sukran dhawan <sukrandha...@gmail.com>wrote: > >> for(i0;i<n/2;i++) >> { >> a[n-1-i] = a[i]; >> } >> >> will this work ? >> where n is the length os string >> >> >> On Sun, Sep 4, 2011 at 7:54 PM, learner <nimish7andr...@gmail.com> wrote: >> >>> Given a word, convert it into a palindrome with minimum addition of >>> letters to it. letters can be added anywhere in the word. for eg if >>> yahoo is given result shud be yahohay. >>> >>> >>> Thanks >>> >>> -- >>> 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. > -- 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.