A string is said to be a palindrome if the reverse of the string is the same as the string.…
A palindrome number is a number that remains the same when digits are reversed. For example, the number 125521 is a palindrome…