Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about palindrome

Read more about palindrome

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)

Questions - palindrome

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 ...
test-img

student

python

recursion

palindrome

Votes: 0

Answers: 1

Latest Answer

Given a recursive function, build_all_palindromes, build all possible palindromes given a list of characters and a target length. The function has 4 parameters: current_string, target_length, current_...
test-img

Ethan Lee

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 ...
test-img

user12207727

java

string

stringbuilder

palindrome

Votes: 0

Answers: 2

Latest Answer

The code does not think that aacakdbacaa and aacabdkacaa are equal. The first part of the condition in the if statement is this sb.reverse().toString().equals(sb.toString()) So what the code (JVM) th...
test-img

Ma3x

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved