Skip to main content

All Questions

Tagged with
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
-1 votes
1 answer
75 views

Palindrome string program [closed]

...
THE BLACKSMITH'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
1 vote
1 answer
115 views

Manacher Algorithm in Haskell

Please review the manacher algorithm in haskell. Find the longest Palindrome in a String. ...
presci's user avatar
  • 249
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: ...
Joe D's user avatar
  • 113
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 ...
user avatar
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 ...
Aviral Srivastava's user avatar
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 ...
Avantika P's user avatar
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 (...
MrJoe's user avatar
  • 2,053
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 ...
Prashin Jeevaganth's user avatar
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. ...
coder's user avatar
  • 2,449
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 ...
Shaik Mohammed Zeeshan's user avatar
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'...
Matadeleo's user avatar
  • 263
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. ...
sahil mehta's user avatar

15 30 50 per page