Skip to main content

All Questions

Tagged with
3 votes
2 answers
67 views

Palindrome predicate

A standard beginner problem is to determine whether a particular input is palindromic, i.e. reads the same in reverse as it does forwards. I thought it might be fun to provide a distinctly non-...
Toby Speight's user avatar
  • 77.3k
-1 votes
1 answer
75 views

Palindrome string program [closed]

...
THE BLACKSMITH's user avatar
2 votes
3 answers
137 views

Find long palindrome multiplications in modern C++

I'm a former C# programmer, updating my rusty C++98 (perhaps I should try Rust instead) to modern C++20. My main goal is to get used to C++ standard library types and algorithms. I chose to solve a ...
Thomas Weller's user avatar
7 votes
5 answers
986 views

Checking whether a string is a permutation of a palindrome in C++20 - follow-up

This post is the follow-up of Checking whether a string is a permutation of a palindrome in C++20. So, what's new? Well, nothing else except that the procedure is now generic and accepts all ...
coderodde's user avatar
  • 28.9k
10 votes
4 answers
2k views

Checking whether a string is a permutation of a palindrome in C++20

(See the next iteration/follow-up here.) I have this short function is_permutation_palindrome, which returns true only if the ...
coderodde's user avatar
  • 28.9k
5 votes
7 answers
3k views

Determine if a word is a palindrome

I'm a newbie programmer and was given a task to find if the input word is a palindrome or not. Now, I've written the program to the best of my ability but would like to know how it could be improved. ...
Manya Garg's user avatar
4 votes
3 answers
2k views

Palindrome test

This is some code that determines if a string of characters is a palindrome or not. My professor says that there is a performance issue with the program, but I can't quite put my finger on it. Can ...
Avantika P's user avatar
10 votes
2 answers
504 views

Determining if a string can be permuted to a palindrome

I am going through Elements of Programming Interview by Aziz, Lee and Prakash one of the questions is how to determine if a string can be permuted to a palindrome. For example ...
mjl007's user avatar
  • 203
3 votes
4 answers
3k views

Find longest Palindrome substring

I am preparing for technical interview and I found this question on geeksforgeeks, but I did not understand their solution. So, I have written my own solution. I want to optimize this code. ...
coder's user avatar
  • 2,449
-2 votes
1 answer
90 views

Find the first palindrome larger than the given number

Question Input number of test cases. Input each test case and output its next palindrome number. Link: https://www.spoj.com/problems/PALIN/ Language Used: C++14 (gcc 6.3) My code ...
suyashsingh234's user avatar
7 votes
3 answers
3k views

The Next Palindromic number

I have incremented an integer in the function nextpalin() and converted it into a std::string for finding whether it's a ...
vibhanshu kumar's user avatar
0 votes
1 answer
204 views

Find largest palindrome from the product of two 3-digit numbers

I think this is a good solution to finding the largest numeric palindrome that can be formed from the product of two 3-digit numbers... But it seems like there are some improvements that we could make ...
Jonathan Mee's user avatar
4 votes
1 answer
920 views

C++ check if Palindrome

Just did this simple application to check whether a string is a palindrome or not ...
saad.sawash's user avatar
13 votes
10 answers
8k views

Tests for palindromes in C and C++

A question I've been asked on interactive phone screens is to code a test to determine whether a string is a palindrome or not. I am providing two examples here: one in C and one in C++. They both ...
pacmaninbw's user avatar
  • 24k
3 votes
2 answers
2k views

Generating all 6-digit palindrome numbers in C++

I just finished my first homework for university where I had to create code that would generate all 6 digit palindrome numbers. Can someone who has more knowledge give me some tips where I can ...
Rinalds's user avatar
  • 31

15 30 50 per page