All Questions
Tagged with palindrome c++
42
questions
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-...
-1
votes
1
answer
75
views
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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.
...
-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
...
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 ...
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 ...
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
...
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 ...
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 ...