Check whether a string is PALINDROME or Not | FACE Prep
Published on 11 Mar 2020
Program to check whether the given string is a palindrome or not is discussed here. A string is said to be a palindrome if the original string and the reverse of the string are the same.
Algorithm to check whether a string is a palindrome or not
- Input the string.
- Find the reverse of the string.
- If the reverse of the string is equal to the input string, then return true. Else, return false.
Program to check whether the given string is a palindrome or not
Enter the string : madam
The string is a palindrome
If you have any feedback about this
article and want to improve this, please write to email@example.com