tmengesh / PalendromeChecker

0 stars 0 forks source link

PalendromeChecker

This program checks if a given string is palindrome or not.

A palindrome is a word that is spelled the same forward and backward. For example, rotor is a palindrome, but motor is not.

The program flow is as follows: If the string is made of no letters or just one letter, then it is a palindrome. Otherwise, it compares the first and last letters of the string. If the first and last letters differ, then the string is not a palindrome.

Otherwise, the first and last letters are the same. Strip them from the string, and determine whether the string that remains is a palindrome.