How to identify a Palindrome?
We can follow the below steps to identify a palindrome:
- Depending on the case sensitivity, either turn all the characters to lowercase or uppercase or keep them as it is.
- Now, Compare the first and the last character. If they are the same move to the second and second last and so on.
- If all the pairs of characters match, then it is a palindrome, otherwise not.