Given a string, Find minimum no of characters to be inserted to convert it to palindrome.
Input: ab
aa
abcd
Output:
1 . insertion to make it bab
0 insertion to make it aa
3 insertions to make it dcbabcd
Input: ab
aa
abcd
Output:
1 . insertion to make it bab
0 insertion to make it aa
3 insertions to make it dcbabcd
No comments:
Post a Comment