Try with DP, a little modicated of Edit Distance algorithm
State i=the begin of the word , j=the end of the word
DP[i][j]= 0 if i==j
0 if(i+1)==j && word[i]==word[j]
1 if(i+1)==j && word[i]!=word[j]
min(DP[i+1][j]+1,DP[i][j-1]+1) otherwise
If you have any question ask!!!
Good luck!!!
Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
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.