Skip to main content

Questions tagged [palindrome]

Any sequence of units (typically letters or numbers) that are read the same way forward or backward.

5votes
3answers
91views

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: ...
michael.zech's user avatar
7votes
3answers
201views

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 ...
tijko's user avatar
3votes
2answers
73views

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-...
Toby Speight's user avatar
3votes
2answers
557views

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 <...
driver's user avatar
4votes
1answer
135views

Is Palindrom-function in Swift

Task is simply to write the classic isPalindrom-function. Here's my implementation: ...
michael.zech's user avatar
2votes
3answers
553views

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 ...
Yamin Siahmargooei's user avatar
-1votes
1answer
76views

Palindrome string program [closed]

...
THE BLACKSMITH's user avatar
4votes
1answer
330views

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: ...
watch-this's user avatar
2votes
2answers
166views

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 "...
ela16's user avatar
2votes
3answers
151views

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 ...
Thomas Weller's user avatar
3votes
1answer
271views

Longest Palindromic Substring | Python Code Giving TLE

Problem Statement Given a string s , return the longest palindromic substring in s. Constraints ...
Rohit Singh's user avatar
3votes
3answers
1kviews

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 ...
Amir Motefaker's user avatar
1vote
1answer
67views

isPalindrom-function in TypeScript

I have written an isPalindrom-Function in TypeScript. ...
michael.zech's user avatar
1vote
1answer
47views

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 ...
Rahul Shivsharan's user avatar
1vote
1answer
229views

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 ...
mhay10's user avatar

153050per page
close