Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
49 views

Is my approach for Palindrome right or is there a better way to do it?

The code below is for checking whether the input string is palindrome or not ...
Rahul Shivsharan's user avatar
3 votes
1 answer
697 views

Optimizing code solution for Palindrome Index-Hackerrank

I submitted my solution for palindrome Index coding challenge but I get "test cases terminated due to time out error". My code is working and so I don't know what else to do to optimize it. Please ...
R. Wanjohi's user avatar
3 votes
0 answers
2k views

HackerRank's Challenging Palindromes solution times out for certain tests

I am trying to solve the Challenging Palindromes problem from HackerRank. The code that I have got so far fails only for large inputs due to timeout, every other test it passes successfully. The ...
Atul Vani's user avatar
1 vote
1 answer
251 views

Palindrome Pairs

The task is taken from leetcode Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + words[j] ...
thadeuszlay's user avatar
  • 4,003
5 votes
3 answers
2k views

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: ...
thadeuszlay's user avatar
  • 4,003
4 votes
1 answer
247 views

Return whether a string is a palindrome if you can delete at most k elements

The task: Given a string which we can delete at most k, return whether you can make a palindrome. For example, given 'waterrfetawx' and a k of 2, you could delete f and x to get 'waterretaw'...
thadeuszlay's user avatar
  • 4,003
11 votes
5 answers
1k views

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 ...
DreamVision2017's user avatar
2 votes
1 answer
299 views

Find palindromes in circular rotated string

I'm trying to tackle a programming challenge to determine how many palindromes exist in a given string that is being rotated character by character. My solution works, but it's too slow, and I'm ...
AnonymousSB's user avatar
8 votes
5 answers
12k views

Find palindromic substrings as efficiently as possible

I've written a function to calculate all the distinct substrings of a given string, that are palindromes. The string is passed as the argument to the function. For example, the string abba is a ...
Matt Kent's user avatar
  • 217