check if a string is palindrome cpp

Solutions on MaxInterview for check if a string is palindrome cpp by the best coders in the world

showing results for - "check if a string is palindrome cpp"
Calum
20 Feb 2019
1// Check whether the string is a palindrome or not.
2#include <bits/stdc++.h>
3
4using namespace std;
5
6int main(){
7    string s;
8    cin >> s;
9    
10    int l = 0;
11    int h = s.length()-1;
12
13    while(h > l){
14        if(s[l++] != s[h--]){
15            cout << "Not a palindrome" << endl;
16            return 0;
17        }
18    }
19    cout << "Is a palindrome" << endl;
20    return 0;
21
22}
queries leading to this page
how to check a string is palindrome or not in c 2b 2bc 2b 2b program to print all palindromic strings which an be formed using given stringgiven a string s 2c check if it is palindrome or not is palindrome string cppc 2b 2b program to make a string palindromecheck if palindrome c 2b 2bhow to check whether the string is palindrome or nothow to check if a string can be a palindrome or notcheck whether a string it is palindrome or notcheck if a string is palindrome or not practice gfgcheck if a number is palindromec 2b 2b find palindromefind out if a given string is a palindromefunction to check palindrome string in c 2b 2bpalindrome c 2b 2b string exampleis string a palindrome c 2b 2bhow to check if string is palindrome in c 2b 2bpalindrome in c 2b 2bhow to check whether a string is a palindrome or notc 2b 2b program to check if string is palindromehow to find whether a string is palindrome or notcheck a number palindrome or not in c 2b 2bpalindrome string in cppcheck palindrome in cppfinding palindrome string of size n c 2b 2bgiven string is palindrome or notcheck if number is palindrome stdto check if string is palindromecheck if substings of a string is palindromeis palindrome string c 2b 2bc 2b 2b program to check if a number is palindrome or notcheck if array is palindrome c 2b 2bwrite a function to check if a string is palindrome or not check string palindrome c 2b 2b gfgstring is palindrome c 2b 2bcheck palindrome in a string c 2b 2b functionpalindrome of a string in c 2b 2bwrite code to check a string is palindrome or not 3f string is palindrome or not c 2b 2bcheck number if palindromecheck if a character list is a palindrome c 2b 2bcheck whether a no is palindrome or not c 2b 2bcheck for string palindrome c 2b 2b stl how to check if number is palindrome c 2b 2bcheck if an integer is a palindrome or not in c 2b 2bhow to check if a string is palindromehow to check string is palindromeinput a string and determine whether it is a palindrome c 2b 2bcheck if string of size n is palindromec 2b 2b palindrome using stacckhow to find if a given no is palindrome cpphow to check if string is palindromecode to check if string is palindrome or notgiven a string 2c determine if it is a palindromemost efficient way to find palidrome in string c 2b 2bcheck if string palindrom c 2b 2bcheck whether the given string is palindrome using stack in c 2b 2bcheck if a string is palindrome using recursion in c 2b 2bcheck if string can be palindromehow do you check if a given string is a palindrome 3fmake a string a palindrome c 2b 2bcheck if integer is palindrome c 2b 2bgiven a string check if its a palindromecheck a string is palindrome or notfunction to check if a string is a palindrome or not way check palindrome or not c 2b 2bhow to check palindrome c 2b 2bfind palindrome string c 2b 2bprogram for palindrome string in c 2b 2bchecking palindrome c 2b 2bhow to check if substring from i to j is palindrome in c 2bcheck is palindrome c 2b 2blogic for palindrome in string c 2b 2bhow do you check if a given string is a palindrome 3f gfg practicecheck if given number is palindrome number or not c 2b 2b programizmaking a palindrome checker in c 2b 2bcheck a palindrome in c 2b 2b using functioncheck if a given string is palindrome cpphow to check if a number is a palindrome in c 2b 2bhow to check palindrome string in cppwrite a program to check a string is palindrome or not in c 2b 2bpalindrome check of string fast check if a string is palindromewrite a cpp program to check whether the given number is palindrome or not palindrome of a string c 2b 2bfind if string is palindrome in one loop c 2b 2b without using length functioncheck palindrome string in cppcheck if string is palidromecheck string palindrome efficiently c 2b 2bgiven the string 2c check if it is a palindromewrite program which checks if string is palindromeprogram for palindrome of string in c 2b 2bhow to check given string is palindrome or notcheck palindrome string in c 2b 2bcheck if a given string is a palindrome or notcheck string palindrome in c 2b 2b using methodcheck the string is palindrome or notcheck if a string is a palindrome or notc 2b 2b check palindromec 2b 2b check palindrome stringpalindrome c 2b 2b string in stringnumber is palindrome or not in c 2b 2bcheck if a string is palindrome c 2b 2bwrite a c 2b 2b program to check if the given input string is palindrome or not 2c if palindrome then reverse it how to check if given string is palindrome in c 2b 2bc 2b 2b program to take number of test cases and check palindromecheck string palindrome c 2b 2bwrite a program that tells whether that string is palindrome or not in c 2b 2bhow to check if a number is palindrome c 2b 2bpalindrom check cppif a string is palindrome or nothow to check if a string is a palindrome chech if string is palindromefinding palindrome in a string c 2b 2bpalindrome function for string c 2b 2bcpp to check if number is palindromefind whether a string is a palindrome or not c 2b 2bcheck palindrome in c 2b 2b stlefficient way to check palindrome c 2b 2bcheck if string is palindrome c 2b 2b using stackbest way to check for palindrome in cpphow to check palindrome cpppalindrome code c 2b 2b stringhow to check whether given string is palindrome or notc 2b 2b check if number is palindromecheck if a given string is a palindrome 3fcheck whether the given string is a palindrome or not check whether a string is palindrome or notcode to figure out whether a string is a palindrome c 2b 2bpalindrom in cppcheck palindrome in c 2b 2bpalindrome check in c 2b 2bwhether a string a palindrome check to see if a number is a palindrome c 2b 2bpalindrome check c 2b 2bcheck if number is a palindromedifferent ways to make a palindrome c 2b 2bpalindrome in c 2b 2bcheck palindrome at user input c 2b 2bhow to check if string is a palindromecheck palindrome c 2b 2b geekshow to check a string is palindrome or notcheck string is palindrome or notcheck a number is palindrome or not c 2b 2bhow do you check if a given string is a palindromehow to make a string not palindrome in c 2b 2bpalindrome or not in c 2b 2bc 2b 2b program to check palindrome stringhow to check whether given number is palindrome or notstrcmp to checkc for palindrome c 2b 2bhow to check if a number is palindromecheck if substring is palindrome cppcheck if string is palindrome c 2b 2bhwo to find a palindrome string ifrom a stringcheck if input string is palindrome or not in cppcheck a palindrome in c 2b 2bcheck palindrome in a string c 2b 2bhow to check palindrome in cprogram to check if string is palindromestring palindrome in c 2b 2bcheck if the string is palindrome cppto check if string is palindrome c 2b 2bpalindrome in string c 2b 2bnumber is palindrome or not c 2b 2bcheck for palindrome in c 2b 2bwrite a function that determines if a string is a palindromecheck whether a number is palindrome or notfind all possible palindromes in a string in c 2b 2bcheck if a string can be made palindromecheck given string is palindrome or notcode for palindrome in cppcpp palindrome stringhow to check string is palindrome or not in c 2b 2bcheck if number is palindrome c 2b 2bchecking palindrome from user input c 2b 2bfunction to check if a string is palindromegiven the string 2c check if it is a palindrome function to check if a value is palindrom check if a string is palindrome in c 2b 2bhow do you check if a given string is palindrome or nothow to check to see if a string is a palindromecheck a string is palindrome or not in c 2b 2bstring is palindrome or not in cpppalindrome program in cppefficient way to test if number is palindrome c 2b 2bwrite a program to check whether the given string is palindrome or notstring palindrome program in c 2b 2bstring is palindrome or not in c 2b 2bpalindrome string in c 2b 2bcheck if two strings are palindrome loginhow to check if a substring can be a palindrome c 2b 2bcheck string is palindrome or not gfg practicesimple cpp to check palindrome of given user datacpp program to check palindrome stringpalindrome of string cpp using stlfind a palindrome number in c 2b 2bdetermine if string is palindromestring is a palindrome or not in c 2b 2bhow to find if a string is palindromedetermine whether a string is palindromefind palindrome in string c 2b 2bchech if string is palindrome c 2b 2bpalindrome program check string in c 2b 2bpalindrome of string cppfind palindrome with string in c 2b 2bto check string is palindrome or notcheck if substring is palindromehow to check if a substring is a palindromec 2b 2b palindrome integer checkerstring palindrome check c 2b 2bis palindrome function c 2b 2bpalindrome char check in c 2b 2bc 2b 2b program to find a palindromeprogram to check for palindrome in c 2b 2b using stlwrite a function that checks whether a string is a palindrome or not check string palindrome in c 2b 2blogic for longest palindrome in string c 2b 2bprogram to check string is palindrome or not how to check if a string is a palindromehow to check palindrome in c 2b 2bcheck palindrome cpppalindrome c 2b 2b stringpalindrome number in cppcpp program to check palindromewrite a c 2b 2b program to check whether a number is palindrome or not check if the given integer is palindrome or not in c 2b 2bhow to check if a number is palindrome in c 2b 2bprogramming to check palindrome in c 2b 2bpalindrome string or not in c 2b 2befficient program for checking a string is palindrome or not in cpphow to check for palindrome cpphow to check if a string is palindrome in c 2b 2bin c 2b 2b write a function of palindrome to check stringc 2b 2b program to find palindromewrite a code for string palindrome checking c 2b 2bc 2b 2b string palindromecheck if palindrome cpppalindrome check in cppcheck palindrome string c 2b 2bhow to check whether the number is palindrome or not c 2b 2bc 2b 2b is palindromecheck if a string is a palindrome c 2b 2bcheck if a string is a palindrome c 2b 2b gfgstring is palindrome in c 2b 2bhow to tell if a string can be a palindromeprogram to check number is palindrome or not in c 2b 2bcheck if a string is a palindromehow to find all possible palindromes in c 2b 2bcheck a string is palindrom or not in cppcheck whether a string is palindrome or not gfg practicecheck if a number is palindrome in c 2b 2bcheck if cpp string is palindromehow to check if number is palindrome in c 2b 2bhow t find a palindrome in cppcheck for palindrome c 2b 2b stlis palindrome c 2b 2bcheck if the string is palindromechecking whether a string can form palindromecpp program to check if string is palindrome using class and objectcheck input for palindrome in cpphow to check if a string is palindrome or notprogram to check palindrome string c 2b 2bvalid palindrome c 2b 2bcheck if a string is palindrome cpppalindrome string using function in cppto check a string is palindrome or nothow to check a no is palindrome or not in c 2b 2bfind if string is palindromehow to print palindrome number in c 2b 2bhow to check the palindrome in c 2b 2bhow to check palindrome c 2b 2b stringvalid palindrome iileetcode solution c 2b 2bcheck for a string palindrome in c 2b 2bwrite a program to check if a given string is palindrome or not in c 2b 2bmake a string palindrome c 2b 2bcheck whether the string is a palindrome or not c 2b 2bpalindrome string c 2b 2bstring is palindrome check in cpppalindrome string function c 2b 2bcheck if a string is palindromecheck for palindrome c 2b 2bhow to check palindrome string in cpp in o 28n 29how to find palindrome substring in a string in cppcheck palindrome string in c 2b 2b using stlcheck the given string is palindrome or notcheck which part of a string is palindrome c 2b 2bcheck if the string is a palindromecheck if array is a palindrome c 2b 2bpalindrome number using string in c 2b 2bcheck whether string is palindrome or notfinding palindrome in a string of size n c 2b 2bsimple cpp to check palindrome of any given user datahow to create a palindrome in c 2b 2bhow do you palindrome in c 2b 2b 3fpalindrome using cppfind if string is palindrome in one loop c 2b 2bchech if string is palindrome c 2bpalindrome of string c 2b 2bcheck palindrome c 2b 2bhow to check number is palindrome or not in c 2b 2bc 2b 2b program to check string is palindrome or nothow to find palindrome substring in a string c 2b 2bcheck if a string is palindrome or notcheck if string is palindromewrite a program to check whether a given string is palindrome or notc 2b 2b program to check palindromepalindrome checker in c 2b 2bcheck if string is a palindromepalindrome string cpppalindrome from string c 2b 2bcheck if the given string is a palindrome or nothow to check palindrome in cppcheck palindrome int c 2b 2bgiven string is palindrome recursioncheck whether a string is palindrome or not c 2b 2bstring palindromes c 2b 2bcheck a string is palindrome or not in cpp by fub 3dnctioncheck if a given string is palindromepalindrome of string in c 2b 2bwrite a program to check number palindrome and string palindrome in c 2b 2bhow to check if a string is palindrome or not in cppthere a function to check whether a string is palindromecheck string palindromepalindrome checking in substring in c 2b 2bprogram to check if a string is a palindromecheck palindrome string palindrome in cpphow to check if a string can be a palindrome c 2b 2bfunction to check palindrome in c 2b 2bhow to know if an integer is a palindrome without using strings in c 2b 2bprint palindrome string in c 2b 2bcheck if given number is a palindrome in c 2b 2bcheck if string or integer is palindromeif palindrome is possible with given stringhow to check string is palindrome or not in c 2b 2b using stlhow to check whether a string is palindrome or notcheck if string is palindrome c 2b 2b both sides c 2b 2b string palindrome in stringc 2b 2b check whether a word is palindrome or notfind if a number is palindrome or notcheck if a string is palindrome in o 281 29see if a string is palindrome c 2b 2bfastest way to check palindrome c 2b 2bpalindrome of string in cppfastest method to determine if a string is palindrome c 2b 2bpalindrome check string cppc 2b 2b check if int is palindromecheck whether string is a palindromestring palindrome c 2b 2bwhat is check string contain palindrome or notcheck for palindrome cppcheck string palindrome in cpppalindrome in c 2b 2b stringcheck if a string is palindrome cpp