A palindrome is a word that reads the same forwards and backward. A string is given, find the minimum number of characters to insert to convert it to a palindrome.
Write a function
solve that have the following parameter(s):
1.) a = string
There is a string given:
a = ap
The function will return,
We can make " ap" palindrome as
"pap" by adding "p" at the front.
So, the minimum number of characters to insert is "1".
• The size of the string will be greater than or equal to 1 and less than or equal to 40.