+ 5
How can we generate a string palandrome from any given string by adding minimum letters to it?
8 odpowiedzi
+ 9
Only adding to the right counts?
+ 8
Very nice, short and clean code :)
+ 6
1232 would only require 1 to become 12321
+ 5
I guess this is too simple?
string = input()
print(string + string[::-1])
+ 4
I'm guessing you also want the code to find embedded palindromes at the end of the word so less letters need to be added, e.g. 'panini' only needs 'nap' added to make a palindrome and 'lotto' just needs an 'l'. That will take a bit more thinking... 🤔
+ 2
I'd say @hamletmun nailed it.
+ 1
thanks @hamlermun