All Questions
Tagged with palindrome java
53
questions
7
votes
3
answers
187
views
Euler - Largest Palindrome Product in Java
Having been going over the documentation, learning more of the subtleties of Java. I am now going over some basic Project-Euler solution code I wrote a little while back. Hoping I can pick up some ...
2
votes
3
answers
544
views
Recursive palindrome check
I'm trying to solve this which basically calls for a recursive palindrome check with some minor extra steps (Special characters and whitespace can be ignored). The test inputs' length can be 100000 ...
1
vote
1
answer
210
views
Finding longest palindromic substring in a string (gives TLE on leetcode)
I'm solving the Longest Palindromic Substring problem on LeetCode.
And here's my final submission:
...
1
vote
1
answer
89
views
Optimizing Code for Project Euler Problem 04
I just finished Problem 04 on Project Euler, and I was looking at ways to optimize my code, just started learning functions too, so I'm pretty sure it's very bad, hopefully you guys can help me.
...
3
votes
2
answers
772
views
Palindrome Algorithm and JUnit 5 Tests
I have a "Palindrome" class that has some functions for verifying if certain things are Palindromes. For the verification, I have 2 different algorithms, one being recursive and the other ...
9
votes
5
answers
3k
views
Palindrome checker program
I've been studying Java for some days and I'm just now starting to make some simple programs, I'd like to know if there's any 'noob' mistakes or habits that I could avoid.
In other words: how could ...
0
votes
3
answers
122
views
Basic Palindrome check comparing chars
I've seen variations of this assignment where you reverse a string to match it to the original to find out if it is a palindrome, but this version I made only iterates through half of the string ...
3
votes
2
answers
689
views
Calculate the largest palindromic number from the product of two 6-digit numbers (100000 to 999999)
Are there any efficient ways to solve this problem,
for example using bitwise operator?
...
2
votes
0
answers
213
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 ...
1
vote
1
answer
52
views
A program that checks for Palindromness
Yes, I made it up.
This program checks if an entered string is a palindrome or not by assigning a char variable the characters ...
2
votes
2
answers
10k
views
Count palindrome substrings
Given a string S, count and return the number of substrings of S that
are palindromes. Single length substrings are also palindromes. We
just have to count the substring that are palindrome.
...
3
votes
2
answers
2k
views
Find a substring which could be rearranged into a palindrome
Problem statement:
To find maximum length substring in an input string which could be
arranged into a palindrome, only even length palindromes are expected.
Input is one line String which ...
3
votes
1
answer
2k
views
Valid Alphanumeric Palindrome
Valid Alphanumeric Palindrome
Problem (from Leetcode)
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, ...
0
votes
1
answer
345
views
Checking if a number is palindrome or not in Java
Got this question in a technical interview and here is my solution:
...
12
votes
4
answers
12k
views
Palindrome-testing Java program for an interview
In an interview I was asked to write a function that would take an input word and return true if the word is a palindrome. At first I used an approach using ...