All Questions
9 questions
1
vote
1
answer
47
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
...
3
votes
1
answer
696
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 ...
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 ...
1
vote
1
answer
248
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] ...
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:
...
4
votes
1
answer
245
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'...
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 ...
2
votes
1
answer
297
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 ...
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 ...