Skip to main content

All Questions

Tagged with
4 votes
2 answers
1k views

Finding palindromic strings of even length

Given a string of digits. Find the length of longest substring of even length i.e. 0,2,... which is a palindrome or which can be rearranged to form a palindrome (see example below). Here is my code: ...
katty's user avatar
  • 605
3 votes
3 answers
6k views

Finding the longest palindromic substring

I have the following code that works correctly. I am wondering if there is a simpler way to go about implementing my solution and/or if there is anything that looks non-standard in my code. If anyone ...
Calvin Ellington's user avatar
5 votes
2 answers
2k views

Valid palindrome solution

I'm working on this valid palindrome problem. Any advice on code bug, better idea for low algorithm execution time complexity, code style, etc. are highly appreciated. Problem Given a string, ...
Lin Ma's user avatar
  • 3,453
4 votes
2 answers
613 views

Number of possible palindrome sequences

Here is the problem description from hackerearth.com: Rohan loves Palindromes. Palindrome is a string that read same forward and backward. For example abba is ...
Shashank's user avatar
  • 255
6 votes
1 answer
885 views

Palindromes that are sum of consecutive squares

I have been working on a Project Euler: 125, which took me ages to solve. The problem and source are cited below The palindromic number 595 is interesting because it can be written as the sum of ...
N3buchadnezzar's user avatar