All Questions
8 questions
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 ...
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] ...
4
votes
4
answers
297
views
Largest Palindrome Product - Project Euler #4
This is my code for Project Euler Problem #4
The question:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find ...
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 ...
2
votes
1
answer
569
views
Project Euler #4 - finding the largest palindrome from the product of two n-digit numbers
Project Euler Problem #4: "A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from ...