Check whether a string/number is a palindrome (recursive and non-recursive).
Asked in the Interview R1 stage. Implement both approaches and return whether the value reads identically from left to right and right to left.
Implement is_palindrome(value, recursive=False). value is a non-empty string or integer. Strings are compared exactly, including case and non-alphanumeric characters. Integers use their decimal representation; negative integers are not palindromes. Return a Boolean. When recursive is False, use an iterative solution. When it is True, use recursion.
def is_palindrome(value, recursive=False):