很邪恶的哟# Joke - 肚皮舞运动
U*y
1 楼
Find minimum number of characters that need to be inserted into a string (
anywhere in the string) to make it a palindrome.
我给的想法是reverse string, 找 Longest common subsequence(同时记录common
char出现在原string的位置),然后扫一遍原string把所有的非common char按照在
reversed string里的顺序补齐. 求正解!
anywhere in the string) to make it a palindrome.
我给的想法是reverse string, 找 Longest common subsequence(同时记录common
char出现在原string的位置),然后扫一遍原string把所有的非common char按照在
reversed string里的顺序补齐. 求正解!