Questions tagged [palindrome]

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

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
169 views

Longest Palindromic Substring challenge

My code is a mix-up between dynamic programming with the HashMap and brute force with the way I reach out the results and substring. I don't know how to optimize my ...
2
votes
0answers
383 views
2
votes
0answers
62 views

Determining if a genetic sequence is palindromic

Adding another level to my previous question on 'normal' palindrome identification, in this one I'm interested in identifying genetic palindromes. Here's my attempt: ...
1
vote
0answers
424 views

Python palindrome function; is it possible to write it without using string conversion?

I hope this question is okay to ask on Code Review; this is a little function I wrote in Python 2.7.12 that checks if a number is a palindrome. It works fine but I'd like to know if there is a purely ...
1
vote
0answers
93 views

C# Project Euler #4: Program that finds Largest palindrome product

So I made a code to improve my programming skills and it works just fine, but it looks chaotic for me. Is there is a better and more efficient way to do it? If you have any ideas/tips I would love to ...
1
vote
0answers
121 views

Longest palindrome O(n^2)

After getting comments on my previous implementation, I have tried to implement with DP. But without using matrix. I am not doing any boundary checks on the string just wanted to see if I am missing ...
1
vote
0answers
294 views

Longest palindrome subsequence

This algorithm finds the longest palindrome that is a subsequence of a given input string in \$\Theta(n^2)\$. Example Input: character Output: ...
0
votes
0answers
36 views

Split string into as few substrings as possible such that each substring is a palindrome

The task Given a string, split it into as few strings as possible such that each string is a palindrome. For example, given the input string racecarannakayak, return ["racecar", "anna", "...
0
votes
0answers
151 views

Longest Palindromic Substring better approach

I have encountered to this question and applied a brute force algorithm off top of my head and couldn't find a better optimized solution. I was hoping I could get some insight to implement a better ...