@Kartikeyan.. I think the above code mimics an LCS equation.. where the 2 strings as input are Original str and the Reverse of the OrigStr.. Is it ?
On Jan 2, 9:14 pm, Karthikeyan Ravi <qwertykarthi1...@gmail.com> wrote: > Hey, > > There is a basic Dp solution. > > have two indexes. one at 0 and another at n-1(n is the length of the string) > let it be i and j > if(string[i]==string[j]) > then do solve(i+1,j-1) > else > min(solve(i+1,j),solve(i,j-1); > > -- > Regards, > R.KARTHIKEYAN > BE CSE 3rd year, > Anna university,Chennai-600025. -- 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.