Skip to main content

Questions tagged [palindrome]

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

3 votes
2 answers
44 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: ...
michael.zech's user avatar
  • 4,358
7 votes
3 answers
186 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 ...
tijko's user avatar
  • 720
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-...
Toby Speight's user avatar
  • 77.2k
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 <...
driver's user avatar
  • 232
4 votes
1 answer
125 views

Is Palindrom-function in Swift

Task is simply to write the classic isPalindrom-function. Here's my implementation: ...
michael.zech's user avatar
  • 4,358
2 votes
3 answers
543 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 ...
Yamin's user avatar
  • 125
-1 votes
1 answer
75 views

Palindrome string program [closed]

...
THE BLACKSMITH's user avatar
4 votes
1 answer
321 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: ...
watch-this's user avatar
1 vote
2 answers
158 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 "...
ela16's user avatar
  • 113
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 ...
Thomas Weller's user avatar
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 ...
Rohit Singh's user avatar
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 ...
Amir Motefaker's user avatar
1 vote
1 answer
66 views

isPalindrom-function in TypeScript

I have written an isPalindrom-Function in TypeScript. ...
michael.zech's user avatar
  • 4,358
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 ...
Rahul Shivsharan's user avatar
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 ...
mhay10's user avatar
  • 39

15 30 50 per page
1
2 3 4 5
18