Skip to main content

All Questions

Tagged with
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 ...
tijko's user avatar
  • 720
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 ...
Yamin's user avatar
  • 125
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: ...
Joe D's user avatar
  • 113
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. ...
fabinfabinfabin's user avatar
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 ...
George R's user avatar
  • 231
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 ...
Tlomoloko's user avatar
  • 637
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 ...
Gemtastic's user avatar
  • 675
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? ...
Selman Keskin's user avatar
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 ...
Manu Carba's user avatar
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 ...
Gabriel Diaz's user avatar
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. ...
sahil mehta's user avatar
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 ...
eshi14's user avatar
  • 33
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, ...
Jae Bradley's user avatar
  • 1,845
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: ...
user avatar
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 ...
smartname1's user avatar

15 30 50 per page