reads the string in then determines if the string is a palindrome.
#include <iostream>
using namespace std;
// Iterative function to check if given string is a palindrome or not
bool isPalindrome(string str)
{
int low = 0;
int high = str.length() - 1;
while (low < high)
{
// if mismatch happens
if (str[low] != str[high])
return false;
low++;
high--;
}
return true;
}
int main()
{
string str = "XYXYX";
if (isPalindrome(str))
cout << "Palindrome";
else
cout << "Not Palindrome";
return 0;
}
Log in, to leave a comment
0
0
#include <iostream>
using namespace std;
// Recursive function to check if str[low..high] is a palindrome or not
bool isPalindrome(string str, int low, int high)
{
// base case
if (low >= high)
return true;
// return false if mismatch happens
if (str[low] != str[high])
return false;
// move to next the pair
return isPalindrome(str, low + 1, high - 1);
}
int main()
{
string str = "XYBYBYX";
int len = str.length();
if (isPalindrome(str, 0, len - 1))
cout << "Palindrome";
else
cout << "Not Palindrome";
return 0;
}
Thank you!
0
0
0
Are there any code examples left?
New code examples in category C++
-
C++ 2023-04-28 17:44:25
-
C++ 2022-03-27 19:20:39 lists occurrences of characters in the string c++
-
C++ 2022-03-27 18:00:14 variabili in c++
-
C++ 2022-03-27 17:10:08 repeat character n times c++
-
C++ 2022-03-27 15:50:07 delete an array c++
-
C++ 2022-03-27 15:40:12 C++ pointer to base class
-
C++ 2022-03-27 12:15:21 find the graph is minimal spanig tree or not
-
C++ 2022-03-27 11:30:15 multi variable assignment cpp
-
C++ 2022-03-27 11:05:17 c++ pi float
-
C++ 2022-03-27 10:20:12 why exceptions can lead to memory leaks
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
no of palindrome string with given characters
function to check if a string is palindrome
Write a script to check whether the given string is a palindrome
Which of the following will generate palindrome string?
how to find palindrome substring in a string
test cases for palindrome string
how to check if string is a palindrome
make palindrome from string
WAP that takes a string as input and print Palindrome if the string is a palindrome.A palindrome is a string that is the same after reversing it.
WAP that takes a string as input and prints Palindrome if the string is a palindrome.A palindrome is a string that is the same after reversing it.
given a string such a way that every substring is a palindrome
palindrome string eg
check if a string is palindrome or not
how to check whether the string is palindrome or not
palimdrome string
is a substring in a string is palindrome
palindrome string logic
check string palindromic
print all palindromes in a string
check string palindrome efficiently
algorithm to find palindrome in a string
Write code to check if a String is palindrome or not?
check if the string is a palindrome
Given the string, check if it is a palindrome
algorithm to check string is palindrome or not
palindrome with string parameters
chech if string is palindrome
convert the given string to palindrome string
examples of palindrome string
generate all palindromes of a string
to check string palindrome or not and reverse string
empty string is palindrome
palindromable string
given string is palindrome or not
how to check whether a string is a palindrome or not
string generate with no palindrome as a substring
Write a program to find that given number or string is palindrome or not.
given a string find if 0-i is palindrome
Program to check whether string entered is a palindrome or not.
How do you check if a given string is a palindrome?
Palindrome - 3 You are given a string, write a program to find whether the string is palindrome or not.
palindrome string solution
Write program to check palindrome string without any string library function
how to find a palindrome in a string
Given a string abc. Display all palindromes to the string
* @ param {string} s - String to check if it has a palindrome permutate
program to vheck if string is palindrome
Codewriting 300 Given the string, check if it is a palindrome.
Create a function that returns True if a string is an almost-palindrome and False otherwise.
check whether string is palindrome or not
number of palindrome in a strinf
how many palindrome present in given string
number of steps to make string palindrom
palindrome check of string
write a program to check palindrome string
Write program which checks if string is palindrome
check if string ic palindromic
Write a function that returns 1 if a string is a palindrome and 0 if not.
Write a program to check whether the given string is a palindrome or not.
how to check whether a string is palindrome or not
Write a program to find all the palindrome words in a string .
is string a palidrome
is string a palindrome
check given string is palindrome or not
check the given string is palindrome or not
write a funnciton its take a string and return palindrom number
number of substrings which can be palindrome
Check whether the string passed to the method is a palindrome or not. Return true if the string is palindrome, else return false.
Write a method to determine whether the input string is a Palindrome or not
check if a string is palindrome in O(1)
if palindrome is possible with given string
logic for palindrome string
program to find the total number of palindrome in a given string
palindrom of string
Check whether the given string is a palindrome or not.
check if a string can be made palindrome
mathematical condition for a string to be palindrome
find a string with n palindromuc substrings
is single character string a palindrome
palindromw string
palindrome string of length 4
check string palindrome for multiple string
string program to check palindrome using array
number of palindrome from n strings
Program to check if a string is a Palindrome without using built in function.
find out palindromic substrings with in a string.
find substring that is palindrome
Write program for string is palindrome or not.
output and code of Write program for string is palindrome or not
How do you check if a given string is a palindrome
print all the possible palindromes of a given string
print all the possible palindromes in a given string
make a string palindrome
Given a string S, check if it is palindrome or not.
palindrome in programming string
Write the logic to check whether the given string is a palindrome or not?
how to check if a string is palindrome or not
find the number of substrings which are palindrome
write a function that determines if a string is a palindrome
Find substring palindrome
how to find number of all palindrome substrings in a string
how many palindromes in a string
how to check if string is palindrome prolog
palindrome string
possible palindrome substrings in a string
check if a string can be rearranges into a palindrome
palindrome string meaning
Palindrom(String
find strings to attach to make palindrome
check if astring is palindrome
print all possible palindrome of string
hwo to find a palindrome string ifrom a string
longeest palindrome in a string
Write a program to check if a string entered by the user is a palindrome string or not.
write a program for palindrome string
Get a string as input and check the given string is palindrome or not without using built-in function for comparison.
check if string is a palindrome
program to check given string is palindrome or not
palindrome find strings true
generate palindrome strings of given length
palindromes in a string
all possible palindromes in a string
smaller palindromes than a string
no of strings before this string are palindromes
find the number of palindromes below a string
Given a string return all the palindromes that can be obtained by its characters
find all the palindromes smaller than string s
find number of palindrome strings
check if two strings are palindrome login
check if two strings are palindrome logn
Get a string as input and check the given string is palindrome or not without using built-in function for compariso chegg
program to check palindrome string
is a string with one character palindrome
is string of length 1 a palindrome
all palindromic substrings in a string
Get a string as input and check the given string is palindrome or not without using built-in function for comparison. chegg
create palindrome from a string
palindrome score of string
palindrome string arrays
palindromes string
number of palindrome in a string
to check string is palindrome or not by iteration
to check string is palindrome or not
is an empty string a palindrome
Write a program to check if the given input string is palindrome or not, if palindrome then reverse it.
code to check a palindrome of string
How many loops are required to check if string is palindrome or not
string is a palindrome or not
program to check if a string is a palindrome
palindrome of string
Write a method that returns true if a string is a palindrome by using a Stack.
find palindrome in a string
find palindrome within a string
find palindrome sub string
.How many palindromes are there in the given string.
find all palindromes in a string
find all possible palindromes using characters of a given string
generate palindrome strings from a string
find all possible palindrome of a string
find all the palindrome using character of string
palindrome string means
is one length string a palindrome?
entered string is palindrome or not.
palindrome string program
n number of string palindromes
Given a string, write a function that checks if the input is a valid palindrome.
number of palindromes in a string
what makes a string palindrome
Write a program to find whether a given string is a palindrome or not.
find out if a given string is a palindrome
Write a program to check if a number is palindrome or not. (Use Loop).
array of string palindrome or not
A palindrome is a string that reads the same from the left and from the right. For example,
check string is palindrome or not
String Palindrome atcodre
check number is palindrome and return not palindrome string
check if a string is palindrome
Can you write a code that will verify if a string is a palindrome or not?
Write a function that determines if a text is Palindrome
test for palindrome number without a string
palindrome substrings of string
Write a function that determines if a string in a palindrome.
find if a string has a palindrome
how to use a stack to check if a string is a palindrome string
input a string and determine whether it is a palindrome
find all palindrome substring in a string
how many palindromic substring in a palindromic string
PALINDROME STRING EXAMPLE
what is a palindrome string
print all the palindromes from the given string
a function that determines if a string is a palindrome recursion
If it is possible to create a string that is not a palindrome
how to check if given string is not palindrome
check whether a string is palindrome or not
? Write a program using function to find out the given string is palindrome or not.
using stack how do you check if a string is a palindrome
how to find a palindrome of a number not string manipulation
how to find a palindrome of a number no string manipulation
How many palindromes are there in the given string
Write a program to check the palindrome string. easy
Write a program to check whether a number is palindrome or not (using while loop).
make string palindrome
given a palindrome string make it non plaindrome
palindrome of a string
program to check if string is palindrome
fastest way to check if string is palindrome
program to check string is palindrome or not
. How many loops are required to check if string is palindrome or not
check a string is palindrome or not
find whether a string is a palindrome or not
Given a string, find all substrings that are palindromes.
How do you search for a palindrome in a string of characters
write a program to check the string is palindrome or not.
string palindrome program
Write a program to check whether a given String is Palindrome or not.
make a string a palindrome
function to test if a string is a palindrome returning boolean
function to test if a string is a palindrome
palindrome of a string without using string functions
Given the string, check if it is a palindrome.
what is palindrome string
write a function to find all the words in a string which are palindrome
palindrome strings examples
how to check string is palindrome or not
string is palindrome
Find whether given string is a palindrome or not
how many palindromes string can be formed from a given strings
palindrome number in string
edtermine whether string is a palindrome
how to check a string is palindrome or not
palindrom string
write a function to determine if a string is a palindrome pseudocode
write a function to determine if a string is a palindrome
how to check if a string is a palindrome
find palindrome in string
example of palindrome string
given string is palindrome
all palindromes in a string
the number of palindromes in the given string
finding palindromic substrings within a string
code to check string is palindrome or not
check whether a string becomes a palindrome by changing only one letter in it
a palindromic string from given string
print all palindrome substrings in a string
change one letter of string and check if it is palindrome
Palindrome strings
what is string in palindrome
"to indicate if the input string is a palindrome, which means"
Someone enters a string and check whether is it palindrome or not,which logic is used?
write a program that reads a string and check if the string is palindrome or not
palindrome program for string
A palindrome can be defined as "a string that reads the same f
a palindrome can be defined as a string
string palindrome
Palindrome program in C | Check if string is Palindrome
Palindrome program in C | Check if number or string is Palindrome | #9 Coding Bytes
21. Tell me how you would reverse a string / sort an array of nums / check a string is palindrome or not in java?
palindrome recursion reverse
Write a recursive program to check if a string is a palindrome? The method returns a boolean to indicate if the string is a palindrome or not. [4 pts]What is the time complexity of your algorithm? [2 pts]
Check if a given string is palindrome using recursi
check if string is palindrome using recursion in python
check if a given string is palindrome using recursion
recursive palindrome
given string is palindrome recursion
a program to check whether entered string is palindrome or not
a program to check whether entered string is palindrome or no
Find palindrome using recursion
bool ispalindrome(string str) recursion
is palindrome recursive
Given a string s check it it's palindrome return true if string is palindrome else return false
palindrome with recursion in c++
recursive solution palindrom pseudocode python
recursive solution palindrom pseudocode pythone
recursive solution palindrom pseudocode
check for palindrome recursion psedocode
check for palindrome recursion
Write a recursive function which takes a word as the input and returns True/False depending on whether it is a palindrome.
palindrone check using recursion
what is string palindrome
palindrome in python recursive
check palindrome recurison
change characters of a string so that it does not contain a palindrome
string is palindrome or not
recursion palindrome
string palindrome in c++ geeksforgeeks
Implement a class to find the reverse of a string and check if the string is a palindrome or not? for c++
palindrome using recursion python
palindrome string using recursion
Write a program which reads a piece of text terminated by null character. Write separate function to check whether the string is palindrome or not.
palindrome string
Write an algorithm that checks whether a given string s is a palindrome (it reads the same way backward as forwards). For i in (0..floor(|s|/2)): If s[i] != s[|s|-1-i]: Return False Return True
"Write down a function called isPalindrome(char str[]) that returns 1 if the string is a palindrome , 0 otherwise." in c
recursion function to print palindrom
palindorme recursion c++
check if a given String is palindrome or not. A Palindrome is a String which is equal to the inverse of itself dart
palindrome main function
is palindrome recursion
palindrome check using recursion
write a function f that determine string is palindrome
palindrome recursion BFF
determine if the dna sequence is a palindrome recursively c++
is this dna sequence a palindrome using recursion
palindrome function recursively
ispalidrome c++ recursion
recursive palindrome solution
c# recursion Palindrome array bool
c# recursion palindrome
palindrome recursive function
palindrome recursive function c++
function "isPalindrome" that takes a string, and returns a boolean value indicating whether the string is a palindrome
palindrome time complexity using slicing, reverse and iteratively
c++ char palindrome recursive
return a palindrome string
is palindrome c++ recursion
pallindrome using recursion
c++ palindrome recursive
check if string is palindrome recursively
2. Write a program to check whether a given string is Palindrome or not using recursion.
string palindrome in recursive
example recursive function to check string
recursive function to check if a string is palindrome
checking palindrome of a string
c++ program to check if the character is substring or not using recursion
c++ program to check if the character is in the string or not using recursion
palindrome rucussion
c++ check palindrome in a string using recursion
palindrome without recursion c++
palindrome without recursion
c++ palindrome checker without recursion
recursive mthod to print single pallindrome
recursive program to check palindrome string
check if a string is palindrome using recursion
Palindrome recursion
check if string is palindrome using recursion in c
detect palindrome
implement a recursive java method to determine if a string has
29. Asked palindrome using recursion c++
use static data member and static function to find if a string is pallindrome or not in c++
wap to find if a string is palindrome or not in c++ using static funtion and static mrmber
check palindrome of a string
find if a given string is palindrome or not
Check Palindrome with recursion
how to check if string is palindrome
palindrome algorithm recursive
function that receives character array and determnes if its a palidrome
check if string is palindrome
check if palindrome is string C recursion
29. Asked palindrome using recursion
palindrome checker using recursion
Write a program to find whether the string Is Palindrome or Not, using recursion in javascript
Write a program to find whether the string Is Palindrome or Not, using recursion.
palindrome using recursion in c++
ispalindrome function c++
short recursive C++ function that determines if a string s is a palindrome egg
short recursive C++ function that determines if a string s is a palindrome
check string palindrome using recursion
chech palindrome recursively
palindrome using recursion
check palindrome using recursion
Check whether a given String S is a palindrome using recursion. Return true or false.
how to check if is plaindrome with recursion and stack java
Write a recursive method and the accompanying main method to check whether a String is a palindrome or not
string palindrome using recursion in c
palindrome of a string using recursion
string palindrome in c++ using recursion
Write a function that checks if a string is palindrome recursively.
function that returns true if the given string is a palindrome. Otherwise
Check Palindrome (recursive) Check whether a given String S is a palindrome using recursion. Return true or false. Input Format : String S Output Format : 'true' or 'false'
check palindrome recursive c++
ispalindrome recursive c++
palindrome recursion python
Write a function to check whether a string is palindrome or not. What is its time complexity?
how to check if a string is palindrome
check if a given string is palindrome or not (using recursion)
create a function that returnsa boolean wheather the string is a strick palindromic