All Questions
Tagged with palindrome strings
50
questions
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:
...
-1
votes
1
answer
75
views
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
...
1
vote
1
answer
115
views
Manacher Algorithm in Haskell
Please review the manacher algorithm in haskell. Find the longest Palindrome in a String.
...
1
vote
1
answer
210
views
Finding longest palindromic substring in a string (gives TLE on leetcode)
I'm solving the Longest Palindromic Substring problem on LeetCode.
And here's my final submission:
...
9
votes
1
answer
2k
views
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 ...
1
vote
0
answers
126
views
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 ...
4
votes
3
answers
2k
views
Palindrome test
This is some code that determines if a string of characters is a palindrome or not. My professor says that there is a performance issue with the program, but I can't quite put my finger on it. Can ...
3
votes
1
answer
381
views
Palindromic partitions solution
Task
Find the smallest number of cuts required to break a string into a set of valid palindromes.
For example:
ababbbabbababa becomes a|babbbab|b|ababa (cuts = 3)
partytrapb becomes partytrap|b (...
1
vote
4
answers
323
views
Read a palindrome of unknown length
I have a task to write the function:
int read_palindrome(); // input comes from stdin
which will read one line from standard input and returns 1 if the line is a ...
3
votes
4
answers
3k
views
Find longest Palindrome substring
I am preparing for technical interview and I found this question on geeksforgeeks, but I did not understand their solution. So, I have written my own solution. I want to optimize this code.
...
2
votes
2
answers
724
views
Find a palindromic string in C
This program tests whether a string is a palindrome or not.
Can there be any improvements or shortcuts that can be used in the program. You can give any type of string as input. The program finds does ...
15
votes
5
answers
6k
views
Palindrome checking function
I recently did a little task for fun that required me to create a class to determine if a word is a palindrome or not. I know this is quite simple, but I'd be interested to know if a real developer (I'...
2
votes
2
answers
10k
views
Count palindrome substrings
Given a string S, count and return the number of substrings of S that
are palindromes. Single length substrings are also palindromes. We
just have to count the substring that are palindrome.
...