Questions tagged [palindrome]
Any sequence of units (typically letters or numbers) that are read the same way forward or backward.
259
questions
3
votes
2
answers
46
views
Ruby: Check for Palindrome (as Monkey-Patch on String-class)
I have written a method, which checks for Palindrome and attached it to the String-class.
Here's the code:
...
7
votes
3
answers
187
views
Euler - Largest Palindrome Product in Java
Having been going over the documentation, learning more of the subtleties of Java. I am now going over some basic Project-Euler solution code I wrote a little while back. Hoping I can pick up some ...
3
votes
2
answers
67
views
Palindrome predicate
A standard beginner problem is to determine whether a particular input is palindromic, i.e. reads the same in reverse as it does forwards.
I thought it might be fun to provide a distinctly non-...
3
votes
2
answers
544
views
One Piece Treasure- Find the number of palindromic substrings in a large substring
I'm trying to solve the below question:
A string of characters X (all in lowercase) of length n is present. We can ask a query <...
4
votes
1
answer
125
views
Is Palindrom-function in Swift
Task is simply to write the classic isPalindrom-function.
Here's my implementation:
...
2
votes
3
answers
544
views
Recursive palindrome check
I'm trying to solve this which basically calls for a recursive palindrome check with some minor extra steps (Special characters and whitespace can be ignored). The test inputs' length can be 100000 ...
-1
votes
1
answer
75
views
4
votes
1
answer
323
views
Leetcode, longest palindromic substring
Here's a link
Given a string s, return the longest palindromic substring in s. A string is called a palindrome string if the reverse of that string is the same as the original string.
Example 1:
...
1
vote
2
answers
160
views
Making my DP algorithm faster - longest palindromic substring
The following code is my solution to a LeetCode question - find the longest palindromic substring. My code is 100% correct, it passed once but it took too long, and in most of the reruns I hit a "...
2
votes
3
answers
137
views
Find long palindrome multiplications in modern C++
I'm a former C# programmer, updating my rusty C++98 (perhaps I should try Rust instead) to modern C++20. My main goal is to get used to C++ standard library types and algorithms.
I chose to solve a ...
3
votes
1
answer
262
views
Longest Palindromic Substring | Python Code Giving TLE
Problem Statement
Given a string s , return the longest palindromic substring in s.
Constraints
...
3
votes
3
answers
1k
views
The largest palindrome made from the product of two 3-digit numbers
Problem description:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the ...
1
vote
1
answer
66
views
isPalindrom-function in TypeScript
I have written an isPalindrom-Function in TypeScript.
...
0
votes
1
answer
38
views
Is my approach for Palindrome right or is there a better way to do it?
The code below is for checking whether the input string is palindrome or not
...
1
vote
1
answer
225
views
Find next biggest palindrome
I have written a program for the SPOJ PALIN problem:
A positive integer is called a palindrome if its[decimal representation is the same]from left to right and from right to left. For a given ...