All Questions
Tagged with programming-challengepalindrome
76 questions
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 ...
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 ...
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: ...
18votes
8answers
5kviews
Project Euler Problem #4 - Palindromic number
The problem is as follows: 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 ...
5votes
3answers
401views
Project Euler #4: palindromic number
The problem statement for Project Euler Problem 4 is as follows: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. ...
6votes
1answer
408views
Palindrome insertion challenge
Here is my solution to the following Daily Coding Problem challenge: Given a string, find the palindrome that can be made by inserting the fewest number of characters as possible anywhere in the word....
11votes
5answers
1kviews
Easy to read palindrome checker
I made a palindrome checker that's supposed to be designed to be simple and easy to read. Please let me know what you think. I believe the time complexity is \$\mathcal{O}(n)\$ but I'm not too sure ...
2votes
1answer
167views
How do I optimize memoization in order to find longest palindromic substring?
I want to find the longest palindromic substring using dynamic programming in Python3. The strings can be as large as this string. I have seen other questions on this problem that successfully solve ...
4votes
4answers
1kviews
Check if a binary tree is symmetric in Python
I have solved the following Leetcode problem. Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric....
1vote
3answers
686views
Finding n-th smallest Palindrome number (where 1<=n<=5000 and the palindrome number must have odd number of digits)
I am working on this code from 3 days from a website called Codechef, the code compiles, executes and even give correct results but my code is taking 1.01 sec, but the time limit for question is 1sec,...
10votes
6answers
3kviews
Determining numeric palindromes
I am working on bettering my C# skills, and recently wrote this program to solve a projecteuler.net problem: A palindromic number reads the same both ways. The largest palindrome made from the ...
3votes
2answers
706views
Calculate the largest palindromic number from the product of two 6-digit numbers (100000 to 999999)
Are there any efficient ways to solve this problem, for example using bitwise operator? ...
9votes
1answer
2kviews
LeetCode on Longest Palindromic Substring in Python
This is a programming question from LeetCode: Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is ...
5votes
3answers
2kviews
Determine whether an integer is a palindrome
The task Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: ...
4votes
2answers
11kviews
Reverse digits and add until a palindrome appears
The following code is a C solution to the following problem UVA 10018. The Problem The "reverse and add" method is simple: choose a number, reverse its digits and add it to the original. If ...