Top "Palindrome" questions

A word, phrase, number, or other sequence of units that may be read the same way in either direction, forward or backward.

Where's the bug in this function to check for palindrome?

Given below is the code to check if a list is a palindrome or not. It is giving correct output …

python palindrome
Manacher's algorithm (algorithm to find longest palindrome substring in linear time)

After spending about 6-8 hours trying to digest the Manacher's algorithm, I am ready to throw in the towel. But …

algorithm palindrome
A better algorithm to find the next palindrome of a number string

Firstly here is the problem: A positive integer is called a palindrome if its representation in the decimal system is …

java algorithm palindrome
How do I ignore punctuation marks and whitespace in java?

import java.util.Scanner; public class Ex3 { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.…

java palindrome punctuation
Check if a permutation of a string can become a palindrome

Write a method to test if a string meets the preconditions to become a palindrome. Eg: Input | Output mmo | True …

string algorithm palindrome
Find the largest palindrome made from the product of two 3-digit numbers

package testing.project; public class PalindromeThreeDigits { public static void main(String[] args) { int value = 0; for(int i = 100;i <=999;i++) { …

java algorithm math palindrome
Longest palindrome in a string using suffix tree

I was trying to find the longest palindrome in a string. The brute force solution takes O(n^3) time. I …

algorithm palindrome suffix-tree
Palindrome detection efficiency

I got curious by Jon Limjap's interview mishap and started to look for efficient ways to do palindrome detection. I …

algorithm performance palindrome
Convert string to palindrome string with minimum insertions

In order to find the minimal number of insertions required to convert a given string(s) to palindrome I find …

algorithm dynamic-programming palindrome lcs
Improving Python Palindrome code

So I recently implemented a code that checks a word to see if it's a palindrome. def isPalindrome(): string = input(…

python palindrome simplify