python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How do you create a palindrome generator as a recursive function?
Inverting a string is easy:
def invert(text):
if text == "":
return text
else:
return invert(text[1:]) + text[0]
I'm trying to create a recursive function that also ...
student
Votes: 0
Answers: 1
Longest Palindrome Edge Case due to String / StringBuilder Equality
This code doesn't work for the test case: aacabdkacaa, but it works for babad or cbbd. I wrote a print statement to debug and realized the code thinks that the strings aacakdbacaa and aacabdkacaa are ...

user12207727
Votes: 0
Answers: 2