Check if a String is a Palindrome
In this article, you'll learn how to check a string is palindrome or not.
A Palindrome is a string that can be read from both sides.
For example:
Input: string = "mom"
Output: True
Input: string = "brother"
Output: False
If you know how to reverse a string or an array then this might be a very easy problem for you. If you don't know, please check out this article "Reverse an Array in Python".
Thank you so much for reading this article, if you like this question please share this with your friends who love programming. And if you have questions or feedback please drop a comment.
To solve more problems, please check out this article "Top 10 String Interview Questions".
All the Best!
Comments
Post a Comment